/* ============================================================================
   لعبة الأسهم — brand.css — the "Sticker Market" layer
   ----------------------------------------------------------------------------
   The logo is a die-cut sticker: a rising lime arrow over four candy bars, white
   lettering with a navy stroke, a lime tag with a dot either side, and confetti.
   This sheet draws the site with those parts. It is loaded LAST, after the
   imported sheets, and only restyles — every colour is a token from
   colors_and_type.css and every length is rem/em (project rule: no px, no hex).

   The same vocabulary in the game: app/lib/widgets/sticker.dart.
   ============================================================================ */

/* ---- 1. Surfaces: an outline and a hard drop ----------------------------- */
.glass-panel,
.card {
  border: 0.125rem solid var(--edge);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sticker);
}

.card-interactive:hover {
  transform: translateY(-0.25rem);
  border-color: var(--primary);
  /* The drop grows by exactly the lift, so the sticker rises off a still shadow. */
  box-shadow:
    var(--shadow-sticker),
    0 0.5625rem 0 0 color-mix(in srgb, var(--edge) 55%, transparent);
}

/* ---- 2. Buttons: a sticker you push ------------------------------------- */
.btn-primary {
  border: 0.125rem solid var(--primary-press);
  box-shadow: var(--shadow-sticker-primary);
  font-weight: var(--fw-bold);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-0.125rem);
  box-shadow:
    var(--shadow-sticker-primary),
    0 0.4375rem 0 0 var(--primary-press);
}

.btn-primary:active {
  background: var(--primary);
  transform: translateY(0.3125rem);
  box-shadow: none;
}

.btn-primary:disabled {
  transform: none;
  box-shadow: none;
}

.btn-outline {
  background: var(--surface-2);
  border-width: 0.125rem;
  font-weight: var(--fw-bold);
}

/* A link styled as a button keeps the button's ink: `.legal-page a` would paint it sky. */
a.btn-primary,
.legal-page a.btn-primary {
  color: var(--fg-on-accent);
}

/* ---- 3. Navigation: one sticker bar -------------------------------------- */
.snav {
  top: 0.75rem;
  margin: 0.75rem auto 0;
  width: min(100% - 1.5rem, 78rem);
  padding: 0.625rem 1.25rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 0.125rem solid var(--edge);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sticker);
}

.snav .brand img {
  height: 2.75rem;
}

.snav-links a {
  font-weight: var(--fw-semibold);
  border-radius: var(--r-pill);
}

.snav-links a:hover {
  color: var(--fg-on-accent);
  background: var(--primary);
}

.snav .iconbtn {
  border-width: 0.125rem;
  border-color: var(--edge);
}

/* ---- 4. The tag: «• لعبة •» ---------------------------------------------- */
.hero-eyebrow,
.sec-wing-title {
  display: inline-flex;
  align-items: center;
  gap: 0.625em;
  padding: 0.3em 0.9em;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-body);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-normal);
  color: var(--fg-on-accent);
  background: var(--green-500);
  background-image: none;
  border: 0.125rem solid var(--fg-on-accent);
  border-radius: var(--r-pill);
  box-shadow: 0 0.1875rem 0 0 var(--green-700);
  text-shadow: none;
}

.hero-eyebrow::before,
.hero-eyebrow::after,
.sec-wing-title::before,
.sec-wing-title::after {
  content: "";
  flex: none;
  width: 0.32em;
  height: 0.32em;
  border-radius: 50%;
  background: var(--fg-on-accent);
}

.hero-eyebrow svg {
  display: none;
}

/* The wings were the old section mark; the tag stands alone. */
.sec-wing-line {
  display: none;
}

.sec-wing-header {
  margin-bottom: 1.125rem;
}

.sec-h h2 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-black);
}

/* ---- 5. Hero -------------------------------------------------------------- */
.shero {
  overflow: visible;
}

.shero-grid {
  padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
}

.shero h1 {
  font-weight: var(--fw-black);
  margin: 1.125rem 0 1rem;
}

/* The logo's extruded lettering: a hard step under each glyph, no blur. */
.shero h1 .g {
  color: var(--green-500);
  text-shadow: 0 0.05em 0 var(--green-700);
}

[data-theme="light"] .shero h1 .g {
  color: var(--green-600);
  text-shadow: 0 0.05em 0 var(--green-800);
}

.shero .lede {
  max-width: 40ch;
}

.shero-art {
  min-height: 24rem;
}

.shero-art img {
  position: relative;
  z-index: 2;
  width: min(100%, 26rem);
  filter: drop-shadow(0 1.25rem 0 color-mix(in srgb, var(--black) 28%, transparent));
}

.shero-glow {
  inset: 2%;
  background: radial-gradient(
    ellipse,
    color-mix(in srgb, var(--sky) 22%, transparent),
    transparent 62%
  );
}

/* Price chips around the mark — decoration, hidden from readers. */
.hero-chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  direction: ltr;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--fg);
  background: var(--surface);
  border: 0.125rem solid var(--edge);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sticker);
  animation: floaty 7s var(--ease-in-out) infinite;
}

.hero-chip b {
  font-weight: var(--fw-semibold);
}

.hero-chip i {
  font-style: normal;
  padding: 0.1rem 0.4rem;
  border-radius: var(--r-xs);
}

.hero-chip--up i {
  color: var(--up);
  background: var(--up-soft);
}

.hero-chip--down i {
  color: var(--down);
  background: var(--down-soft);
}

.hero-chip--1 {
  inset-block-start: 6%;
  inset-inline-start: 2%;
  rotate: -5deg;
  animation-delay: -2s;
}

.hero-chip--2 {
  inset-block-end: 16%;
  inset-inline-end: 0;
  rotate: 4deg;
  animation-delay: -4s;
}

.hero-chip--3 {
  inset-block-end: 2%;
  inset-inline-start: 10%;
  rotate: 3deg;
  animation-delay: -1s;
}

/* The logo's confetti, behind the hero. */
.hero-confetti {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 0.8;
}

.hero-confetti .c1 {
  fill: var(--bar-1);
}

.hero-confetti .c2 {
  fill: var(--bar-2);
}

.hero-confetti .c3 {
  fill: var(--bar-3);
}

.hero-confetti .c4 {
  fill: var(--bar-4);
}

.shero > .wrap {
  position: relative;
  z-index: 1;
}

/* ---- 6. The four bars: the hero's figures --------------------------------- */
.trust {
  align-items: end;
  gap: 1rem;
  max-width: 60rem;
  margin: 0.5rem auto 0;
  background: none;
  border: 0;
  border-radius: 0;
  overflow: visible;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.trust .t {
  --bar: var(--bar-1);
  padding: 1rem 0.75rem 1.125rem;
  text-align: center;
  background: var(--surface);
  border: 0.125rem solid var(--edge);
  border-block-start: 0.5rem solid var(--bar);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sticker);
}

/* As in the mark, the bars rise from left to right whatever the page direction: the first
   figure is the tallest, red one on the right. */
.trust .t:nth-child(1) {
  --bar: var(--bar-4);
  padding-block-start: 3.25rem;
}

.trust .t:nth-child(2) {
  --bar: var(--bar-3);
  padding-block-start: 2.5rem;
}

.trust .t:nth-child(3) {
  --bar: var(--bar-2);
  padding-block-start: 1.75rem;
}

.trust .t:nth-child(4) {
  --bar: var(--bar-1);
}

.trust .t .n {
  color: var(--fg);
  font-size: 2.5rem;
}

.trust .t .l {
  margin-top: 0.375rem;
  font-weight: var(--fw-medium);
}

/* ---- 7. Features and steps: one bar colour each --------------------------- */
.fcard {
  padding: 2.25rem 2rem;
}

.fcard .ic,
.s3 .n {
  --bar: var(--bar-1);
  width: 4.25rem;
  height: 4.25rem;
  margin-bottom: 1.25rem;
  /* The markup tints each icon inline; the bar colour replaces it. */
  background: var(--bar) !important;
  color: var(--fg-on-accent);
  border: 0.125rem solid var(--fg-on-accent);
  border-radius: var(--r-md);
  box-shadow: 0 0.25rem 0 0 var(--fg-on-accent);
  transform: rotate(-4deg);
}

.fcard .ic svg {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--fg-on-accent) !important;
}

.fcard:nth-child(4n + 2) .ic,
.s3:nth-child(4n + 2) .n {
  --bar: var(--bar-2);
  transform: rotate(3deg);
}

.fcard:nth-child(4n + 3) .ic,
.s3:nth-child(4n + 3) .n {
  --bar: var(--bar-3);
}

.fcard:nth-child(4n + 4) .ic,
.s3:nth-child(4n + 4) .n {
  --bar: var(--bar-4);
  transform: rotate(3deg);
}

.fcard h3 {
  font-size: 1.5rem;
  margin-bottom: 0.625rem;
}

.fcard p,
.s3 p {
  font-size: var(--fs-body);
}

.s3 {
  padding: 2.25rem 1.5rem;
  box-shadow: var(--shadow-sticker);
}

.s3 .n {
  margin-inline: auto;
  font-size: 2.5rem;
}

.s3 h4 {
  font-size: 1.375rem;
}

/* ---- 8. Pricing ----------------------------------------------------------- */
.plan {
  padding: 2.75rem 2.5rem;
}

.plan.featured,
.plan.card-raised {
  border-color: var(--primary);
  box-shadow:
    0 0.3125rem 0 0 var(--primary-press),
    var(--shadow-sticker);
}

.plan h3 {
  font-size: 1.875rem;
}

.plan .price .amt {
  font-size: 5.5rem;
}

.pricing--compact .plan {
  padding: 2.5rem 2rem;
}

.plan li {
  font-size: var(--fs-body);
}

/* ---- 9. Questions --------------------------------------------------------- */
.qitem {
  border: 0.125rem solid var(--edge);
  box-shadow: var(--shadow-sticker);
  transition: border-color var(--dur) var(--ease-out);
}

.qitem.open {
  border-color: var(--primary);
}

.qhead {
  padding: 1.5rem 1.75rem;
  font-size: 1.1875rem;
}

.qbody p {
  padding: 0 1.75rem 1.5rem;
  font-size: var(--fs-body);
}

/* ---- 10. The closing band: the tag, at full width -------------------------- */
.cta-band,
[data-theme="light"] .cta-band {
  background: var(--green-500);
  border: 0.1875rem solid var(--fg-on-accent);
  border-radius: var(--r-2xl);
  box-shadow: 0 0.5rem 0 0 var(--green-700);
  color: var(--fg-on-accent);
}

/* Half the band: half the padding and half the row, centred. Also beats style.css's phone
   padding, which is the same selector loaded earlier. */
.cta-band {
  max-width: 36rem;
  margin-inline: auto;
  padding: clamp(1.25rem, 3vw, 2.5rem) 1.25rem;
}

.cta-band h2 {
  font-size: var(--fs-h3);
  margin-bottom: 0.375rem;
}

.cta-band .text-muted {
  margin-bottom: 0.875rem !important;
}

/* A scatter of the mark's dots where the old glow was. */
.cta-band::before {
  inset: 0;
  filter: none;
  opacity: 0.9;
  background:
    radial-gradient(circle at 7% 24%, var(--bar-1) 0 0.5rem, transparent 0.5625rem),
    radial-gradient(circle at 14% 76%, var(--bar-3) 0 0.375rem, transparent 0.4375rem),
    radial-gradient(circle at 90% 22%, var(--bar-4) 0 0.4375rem, transparent 0.5rem),
    radial-gradient(circle at 94% 70%, var(--white) 0 0.375rem, transparent 0.4375rem),
    radial-gradient(circle at 80% 88%, var(--bar-1) 0 0.3125rem, transparent 0.375rem),
    radial-gradient(circle at 24% 12%, var(--white) 0 0.3125rem, transparent 0.375rem);
}

.cta-band h2 {
  color: var(--fg-on-accent);
  font-weight: var(--fw-black);
}

.cta-band .text-muted {
  color: color-mix(in srgb, var(--fg-on-accent) 82%, transparent);
  font-weight: var(--fw-medium);
}

.cta-band .btn-primary,
.cta-band .btn-primary:hover,
.cta-band .btn-primary:active {
  background: var(--ink-950);
  color: var(--white);
  border-color: var(--ink-950);
}

.cta-band .btn-primary {
  box-shadow: 0 0.3125rem 0 0 var(--green-800);
}

.cta-band .btn-primary:hover {
  box-shadow: 0 0.4375rem 0 0 var(--green-800);
}

.cta-band .btn-primary:active {
  box-shadow: none;
}

.cta-band .btn-primary::before {
  display: none;
}

/* ---- 11. Footer: the four bars, laid flat --------------------------------- */
.sfooter {
  position: relative;
}

.sfooter::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.375rem;
  /* Left to right in either page direction, as in the mark. */
  background: linear-gradient(
    to right,
    var(--bar-1) 0 25%,
    var(--bar-2) 25% 50%,
    var(--bar-3) 50% 75%,
    var(--bar-4) 75% 100%
  );
}

/* ---- 12. Rhythm: one section's air between two sections -------------------- */
/* The imported 6.875rem top and bottom stacked into 14rem of empty navy between two titles on a
   laptop — more than a screen's third. */
.sec {
  padding-block: clamp(2.75rem, 6vw, 5rem);
}

/* ---- 13. The gallery: a stage, not a letterbox ------------------------------ */
/* Half the shots are phone-tall and half are laptop-wide, so a black 16:9 box showed most of
   them as a strip of picture between two black bars. The stage is the page's own surface with
   the logo's dots, and each shot sits on it as a sticker at its own proportions. */
.features-gallery {
  max-width: 64rem;
  margin-inline: auto;
  padding: 1rem;
}

.fg-viewport {
  aspect-ratio: 16 / 10;
  background-color: var(--surface-2);
  background-image: radial-gradient(
    circle,
    color-mix(in srgb, var(--fg-muted) 30%, transparent) 0 0.09rem,
    transparent 0.1rem
  );
  background-size: 1.25rem 1.25rem;
  border: 0.125rem solid var(--edge);
}

.fg-slide {
  padding: 1.5rem 4.75rem;
}

.fg-slide img,
.fg-slide video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  background: transparent;
  border: 0.125rem solid var(--edge);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sticker);
}

.fg-nav,
.fg-zoom,
.fg-counter {
  color: var(--fg);
  background: var(--surface);
  border: 0.125rem solid var(--edge);
  box-shadow: var(--shadow-sticker);
}

.fg-nav:hover,
.fg-zoom:hover {
  color: var(--fg-on-accent);
  background: var(--primary);
  border-color: var(--primary-press);
  box-shadow: var(--shadow-sticker-primary);
}

.fg-counter {
  font-family: var(--font-mono);
  font-weight: var(--fw-semibold);
}

.fg-dot {
  background: var(--edge);
}

.fg-dot:hover {
  background: var(--fg-muted);
}

.fg-dot.is-active {
  background: var(--primary);
}

/* ---- 14. Pricing with one card ---------------------------------------------- */
/* Until `/v1/plans` answers — or when it cannot — the free trial is the only card, and a
   two-column grid left it hugging one side of an empty row. */
.pricing:has(> .plan:only-of-type) {
  grid-template-columns: minmax(0, 30rem);
  justify-content: center;
}

/* ---- 15. Narrow screens ---------------------------------------------------- */
@media (max-width: 53.75rem) {
  .shero-art {
    min-height: 0;
    padding-block: 1.5rem 0.5rem;
  }

  .shero-art img {
    width: min(64%, 16rem);
  }

  .hero-chip--3 {
    display: none;
  }

  .hero-chip {
    font-size: var(--fs-xs);
    padding: 0.35rem 0.6rem;
  }

  .shero-cta > .btn {
    flex: 1 1 12rem;
  }
}

@media (max-width: 48rem) {
  .snav {
    width: calc(100% - 1rem);
    padding: 0.5rem 0.875rem;
    border-radius: var(--r-lg);
  }

  /* Two by two, and level: four rising bars need the width of a row of four. */
  .trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .trust .t:nth-child(n) {
    padding-block-start: 0.875rem;
  }

  .trust .t .n {
    font-size: 2rem;
  }

  .fcard,
  .s3 {
    padding: 1.5rem 1.125rem;
  }

  .fcard .ic,
  .s3 .n {
    width: 3.25rem;
    height: 3.25rem;
    margin-bottom: 0.875rem;
  }

  .fcard .ic svg {
    width: 1.75rem;
    height: 1.75rem;
  }

  .s3 .n {
    font-size: 2rem;
  }

  .plan {
    padding: 2rem 1.5rem;
  }

  .plan .price .amt {
    font-size: 4.5rem;
  }

  .qhead {
    padding: 1.125rem 1.25rem;
    font-size: 1.0625rem;
  }

  .qbody p {
    padding: 0 1.25rem 1.125rem;
  }

  /* Squarer on a phone, so a phone-tall shot is not a thumbnail. */
  .features-gallery {
    padding: 0.625rem;
  }

  .fg-viewport {
    aspect-ratio: 4 / 3;
  }

  .fg-slide {
    padding: 0.75rem 3.25rem;
  }
}

/* A phone held upright: two feature cards side by side left four words a line, so each card
   becomes one row — the icon beside its title and text. */
@media (max-width: 36rem) {
  .fgrid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.875rem;
  }

  .fcard {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 1rem;
    align-items: start;
    padding: 1.25rem 1.125rem;
  }

  .fcard .ic {
    grid-row: span 2;
    margin-bottom: 0;
  }

  .fcard h3 {
    margin-bottom: 0.375rem;
    font-size: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-chip {
    animation: none;
  }
}
