/* Official-stores page (/fa/stores, /en/stores) - 2026-12-04, second design.

   Own prefix (st-), site tokens for colour (--bg --card --fg --muted --border --primary --accent --grad
   --shadow), so it follows the dark (default) and light themes by itself. The only literal colours are the
   white logo tile (a logo must read on both themes: Sooftware is black, UpdateStar is thin grey) and the
   ink / blue that go with it. Logical properties throughout (RTL = same rules); every grid track is
   minmax(0, 1fr) so no card can push the page wider than the viewport.

   MOTION RULE: nothing is ever hidden or dimmed by an animation. There is no opacity anywhere in this file
   and no script reveal, so a frozen first frame (a throttled or slow tab, a screenshot) already looks like
   the finished page. What moves: the hero rings turn slowly and the logo chips are counter-rotated so they
   stay upright (paused on hover), cards slide
   up a few pixels, the banner laurels sway, cards lift on hover. All of it is off under
   prefers-reduced-motion. */

@keyframes st-in    { from { transform: translateY(18px); } }
@keyframes st-spin  { to { rotate: 360deg; } }
@keyframes st-unspin { to { rotate: -360deg; } }
@keyframes st-pulse { from { transform: scale(.94); } to { transform: scale(1.12); } }
@keyframes st-sway  { from { transform: rotate(-2.2deg); } to { transform: rotate(2.2deg); } }

.st-sr {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; border: 0;
}
.st-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---- hero: heading on one side, the logo with the store logos around it on the other ---- */
.st-hero {
    display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    gap: 28px 56px; align-items: center;
    padding-block: 52px 36px;
}
.st-hero-text { min-width: 0; }

.st-h1 {
    margin: 0; font-size: clamp(32px, 7vw, 66px); font-weight: 900;
    line-height: 1.25; letter-spacing: -.02em; text-wrap: balance;
}
html[lang^="fa"] .st-h1 { line-height: 1.3; letter-spacing: 0; }
/* Home-page heading: weight 900, tight leading. Each line stays on one line in the hero column from 900 px up
   (sizes measured at 1280 and 1440 in both languages); phones wrap sensibly (balanced). */
@media (min-width: 900px) {
    .st-h1 { font-size: clamp(30px, 3.6vw, 52px); }
    html:not([lang^="fa"]) .st-h1 { font-size: clamp(28px, 3vw, 44px); }
}

/* Both lines are blocks starting on the same edge. Line 1: product name in the text colour. */
.st-h1-a {
    display: block;
    color: var(--fg);
}
/* Line 2: the home page's blue gradient text (.hv-grad), a darker variant on the light theme. The bottom padding
   keeps dots and descenders inside the box that background-clip:text paints into. */
.st-h1-b {
    display: block; margin-top: .04em; padding-bottom: .16em; margin-bottom: -.16em;
    background: linear-gradient(90deg, #6B8CFF, #B9C8FF 60%, #6B8CFF);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
:root[data-theme="light"] .st-h1-b { background-image: linear-gradient(90deg, #2646C6, #5A78F0 60%, #2646C6); }

.st-intro {
    margin: 20px 0 0; max-width: 30em; color: var(--muted); text-wrap: balance;
    font-size: clamp(16px, 2.3vw, 19px); line-height: 1.9;
}

/* The picture (decorative, aria-hidden): soft discs, two turning rings of logo chips, the PDM logo in the middle.
   Chip positions are --x / --y in percent of the box; the chips are counter-rotated so they stay upright. */
.st-orbit { position: relative; width: min(100%, 400px); aspect-ratio: 1; margin-inline: auto; }
.st-halo, .st-track { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.st-halo circle { stroke-width: .3; stroke: var(--border); }
.st-d1 { fill: color-mix(in srgb, var(--primary) 4%, transparent); }
.st-d2 { fill: color-mix(in srgb, var(--primary) 6%, transparent); }
.st-d3 { fill: color-mix(in srgb, var(--primary) 13%, transparent); }
.st-track { fill: none; }
.st-track circle { fill: none; stroke: color-mix(in srgb, var(--primary) 50%, transparent); stroke-width: .35; stroke-dasharray: .9 1.9; }

.st-ring { position: absolute; inset: 0; animation: st-spin 80s linear infinite; }
.st-ring-out { animation: st-spin 120s linear infinite reverse; }

.st-chip {
    position: absolute; inset-inline-start: calc(var(--x) * 1%); inset-block-start: calc(var(--y) * 1%);
    translate: var(--tx, -50%) -50%;
    display: grid; place-items: center; width: 12.5%; aspect-ratio: 1; border-radius: 50%;
    background: #fff; border: 1px solid color-mix(in srgb, #0a1a33 10%, transparent);
    box-shadow: 0 8px 20px color-mix(in srgb, #0a1a33 18%, transparent);
    animation: st-unspin 80s linear infinite;
}
.st-ring-out .st-chip { animation: st-unspin 120s linear infinite reverse; }
[dir="rtl"] .st-chip { --tx: 50%; }
.st-chip > img, .st-chip > svg { width: 64%; height: 64%; object-fit: contain; transition: transform .3s cubic-bezier(.2, .8, .3, 1.3); }
.st-chip > img { border-radius: 20%; }
.st-chip:hover > img, .st-chip:hover > svg { transform: scale(1.18); }
.st-orbit:hover .st-ring, .st-orbit:hover .st-chip { animation-play-state: paused; }

.st-core { position: absolute; inset-inline-start: 36.5%; inset-block-start: 36.5%; width: 27%; aspect-ratio: 1; }
.st-core::before {
    content: ""; position: absolute; inset: -32%; border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--primary) 40%, transparent) 0%, transparent 66%);
    animation: st-pulse 5s ease-in-out infinite alternate;
}
.st-core img {
    position: relative; display: block; width: 100%; height: 100%; border-radius: 26%;
    box-shadow: 0 14px 34px color-mix(in srgb, var(--primary) 38%, transparent);
}

/* ---- sections ------------------------------------------------------------ */
.st-section { padding-block: 14px 44px; }
.st-h2 {
    display: flex; align-items: center; gap: 12px; margin: 0 0 20px;
    font-size: clamp(22px, 3vw, 28px); font-weight: 800; line-height: 1.5;
}
.st-h2::before { content: ""; flex: none; width: 6px; height: 1.1em; border-radius: 4px; background: var(--grad); }

.st-grid {
    list-style: none; margin: 0; padding: 0;
    display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.st-grid.st-c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.st-grid > li { min-width: 0; display: flex; }
/* 7 cards: 4 + 3, the last row centred (8 half-width tracks, every card spans 2, the 5th starts on track 2) */
.st-grid.st-c7 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.st-grid.st-c7 > li { grid-column: span 2; }
.st-grid.st-c7 > li:nth-child(5) { grid-column: 2 / span 2; }

/* ---- store card: centred, big logo on a light tile, name, one muted line ---- */
.st-card {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px;
    flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 28px 18px 20px;
    text-align: center; text-decoration: none; color: var(--fg);
    border: 1px solid var(--border); border-radius: 26px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 5%, var(--card)), var(--card) 62%);
    transition: transform .3s cubic-bezier(.2, .7, .3, 1), border-color .25s, box-shadow .3s;
    animation: st-in .6s cubic-bezier(.2, .7, .3, 1) calc(var(--i, 0) * 55ms) backwards;
}
a.st-card:hover, a.st-card:focus-visible {
    transform: translateY(-6px); border-color: color-mix(in srgb, var(--primary) 60%, var(--border));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 38%, transparent), 0 22px 46px color-mix(in srgb, var(--primary) 20%, transparent);
}
a.st-card:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.st-tile {
    flex: none; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 26px;
    background: #fff; color: #2d6cff;
    border: 1px solid color-mix(in srgb, #0a1a33 9%, transparent);
    box-shadow: 0 10px 22px color-mix(in srgb, #0a1a33 14%, transparent);
    transition: transform .4s cubic-bezier(.2, .8, .3, 1.3);
}
a.st-card:hover .st-tile, a.st-card:focus-visible .st-tile { transform: scale(1.09) rotate(-3deg); }
.st-tile img { display: block; width: 68px; height: 68px; object-fit: contain; border-radius: 14px; }
.st-tile > svg { width: 56px; height: 56px; }
.st-tile .st-gicon { width: 44px; height: 44px; }

.st-body { flex: 1 1 auto; min-width: 0; }
.st-name { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.6; overflow-wrap: anywhere; }
.st-line { display: block; margin-top: 2px; font-size: 14.5px; line-height: 1.75; color: var(--muted); }

.st-go {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; margin-top: auto;
    min-height: 44px; padding-inline: 16px; border-radius: 999px;
    font-size: 14px; font-weight: 700; color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    transition: background-color .25s;
}
a.st-card:hover .st-go, a.st-card:focus-visible .st-go { background: color-mix(in srgb, var(--primary) 20%, transparent); }
.st-ext { flex: none; transition: transform .25s; }
a.st-card:hover .st-ext, a.st-card:focus-visible .st-ext { transform: translate(2px, -2px); }
[dir="rtl"] a.st-card:hover .st-ext, [dir="rtl"] a.st-card:focus-visible .st-ext { transform: translate(-2px, -2px); }

/* ---- "on other sites": lighter, compact, logo at the start ---------------- */
.st-others .st-grid { gap: 14px; }
.st-others .st-card {
    flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px;
    text-align: start; border-radius: 20px;
    background: color-mix(in srgb, var(--card) 62%, transparent);
}
.st-others .st-tile { width: 60px; height: 60px; border-radius: 17px; box-shadow: 0 6px 14px color-mix(in srgb, #0a1a33 12%, transparent); }
.st-others .st-tile img { width: 42px; height: 42px; border-radius: 10px; }
.st-others .st-tile .st-gicon { width: 30px; height: 30px; }
.st-others .st-name { font-size: 16px; }
.st-others .st-line { font-size: 14px; margin-top: 0; }
.st-others .st-go { margin-top: 0; margin-inline-start: auto; min-height: 36px; min-width: 36px; padding-inline: 0; background: transparent; }
.st-others a.st-card:hover .st-go, .st-others a.st-card:focus-visible .st-go { background: transparent; }
.st-others a.st-card:hover { transform: translateY(-4px); }

/* ---- "which version is for you?": four plain text items, server-rendered, no animation ------------- */
.st-which-grid {
    list-style: none; margin: 0; padding: 0;
    display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.st-which-grid > li { min-width: 0; display: flex; }
.st-wcard {
    flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 20px 18px 8px;
    border: 1px solid var(--border); border-radius: 22px;
    background: color-mix(in srgb, var(--card) 62%, transparent);
}
.st-wname { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.6; overflow-wrap: anywhere; }
.st-wtext { margin: 0; font-size: 14.5px; line-height: 1.85; color: var(--muted); }
.st-wlink {
    display: inline-flex; align-items: center; align-self: flex-start; gap: 6px; margin-top: auto;
    min-height: 44px; font-size: 15px; font-weight: 700; color: var(--primary); text-decoration: none;
}
.st-wlink:hover { text-decoration: underline; text-underline-offset: 4px; }
.st-wlink:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

/* ---- closing banner: laurel branches on both sides of the question -------- */
.st-end { padding-block: 8px 72px; }
.st-side {
    position: relative; isolation: isolate; overflow: hidden; min-width: 0; text-align: center;
    padding: 46px 170px; border-radius: 32px;
    border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--border));
    background: linear-gradient(145deg,
        color-mix(in srgb, var(--primary) 26%, var(--card)) 0%,
        color-mix(in srgb, var(--accent) 16%, var(--card)) 100%);
    box-shadow: var(--shadow);
}
.st-side-t { margin: 0 auto; max-width: 30em; font-size: clamp(20px, 2.8vw, 27px); font-weight: 800; line-height: 1.65; overflow-wrap: anywhere; }
.st-side-p { margin: 10px auto 0; max-width: 32em; font-size: 16px; line-height: 1.85; color: color-mix(in srgb, var(--fg) 82%, transparent); }
.st-side-cta {
    display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin-top: 22px; padding: 0 26px;
    border-radius: 999px; background: var(--fg); color: var(--bg);
    font-size: 15px; font-weight: 700; line-height: 1.2; text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}
.st-side-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.st-side-cta:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.st-laurel {
    position: absolute; bottom: -10px; z-index: -1; width: 150px; height: 168px;
    color: color-mix(in srgb, var(--primary) 34%, transparent); pointer-events: none;
    overflow: visible; /* the top leaf and the sway stay whole */
}
/* A wreath: the first branch leans in from the start side, the second one is its mirror image. */
.st-laurel-a { inset-inline-start: 22px; }
.st-laurel-b { inset-inline-end: 22px; transform: scaleX(-1); }
[dir="rtl"] .st-laurel-a { transform: scaleX(-1); }
[dir="rtl"] .st-laurel-b { transform: none; }
.st-sway { transform-box: fill-box; transform-origin: 50% 100%; animation: st-sway 7s ease-in-out infinite alternate; }
.st-arrow { transition: transform .25s; }
[dir="rtl"] .st-arrow { transform: scaleX(-1); }
.st-side-cta:hover .st-arrow { transform: translateX(4px); }
[dir="rtl"] .st-side-cta:hover .st-arrow { transform: translateX(-4px) scaleX(-1); }

/* ---- breakpoints: 4 (or 3) -> 2 columns; phones keep 2 for stores, other sites go to 1 ---- */
@media (max-width: 1099px) {
    .st-grid, .st-grid.st-c3, .st-grid.st-c7, .st-which-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .st-grid.st-c7 > li, .st-grid.st-c7 > li:nth-child(5) { grid-column: auto; }
    .st-grid.st-c7 > li:last-child { grid-column: 1 / -1; width: calc(50% - 7px); justify-self: center; }
    .st-side { padding-inline: 130px; }
    .st-laurel { width: 120px; height: 134px; }
}
@media (max-width: 899px) {
    .st-hero { grid-template-columns: minmax(0, 1fr); padding-block: 36px 20px; gap: 22px; }
    .st-intro { max-width: none; }
    .st-orbit { width: min(100%, 310px); }
}
@media (max-width: 639px) {
    .st-others .st-grid, .st-others .st-grid.st-c3, .st-others .st-grid.st-c7 { grid-template-columns: minmax(0, 1fr); }
    .st-others .st-grid.st-c7 > li:last-child { width: auto; justify-self: stretch; }
    .st-which-grid { grid-template-columns: minmax(0, 1fr); }
    .st-grid { gap: 12px; }
    .st-section { padding-block: 10px 34px; }
    .st-card { gap: 12px; padding: 22px 12px 14px; border-radius: 22px; }
    .st-tile { width: 76px; height: 76px; border-radius: 22px; }
    .st-tile img { width: 54px; height: 54px; }
    .st-tile > svg { width: 46px; height: 46px; }
    .st-tile .st-gicon { width: 38px; height: 38px; }
    .st-name { font-size: 16px; }
    .st-line { font-size: 14px; }
    .st-go { padding-inline: 12px; }
    .st-others .st-card { padding: 12px 14px; }
    .st-others .st-tile { width: 56px; height: 56px; border-radius: 16px; }
    .st-others .st-tile img { width: 40px; height: 40px; }
    .st-others .st-tile .st-gicon { width: 30px; height: 30px; }
    .st-end { padding-block: 4px 48px; }
    .st-side { padding: 34px 20px 30px; border-radius: 26px; }
    .st-side-cta { margin-top: 20px; }
    /* Branches shrink into the bottom corners, beside the button. */
    .st-laurel { width: 62px; height: 70px; bottom: 4px; }
    .st-laurel-a { inset-inline-start: 12px; }
    .st-laurel-b { inset-inline-end: 12px; }
}

/* ---- no motion ----------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .st-ring, .st-chip, .st-core::before, .st-card, .st-sway { animation: none !important; }
    .st-card, .st-tile, .st-chip > img, .st-chip > svg, .st-ext, .st-arrow, .st-side-cta { transition: border-color .2s, box-shadow .2s; }
    a.st-card:hover, a.st-card:focus-visible, .st-others a.st-card:hover, .st-side-cta:hover { transform: none; }
    a.st-card:hover .st-tile, a.st-card:focus-visible .st-tile { transform: none; }
    .st-chip:hover > img, .st-chip:hover > svg { transform: none; }
    a.st-card:hover .st-ext, a.st-card:focus-visible .st-ext, [dir="rtl"] a.st-card:hover .st-ext, [dir="rtl"] a.st-card:focus-visible .st-ext { transform: none; }
    .st-side-cta:hover .st-arrow { transform: none; }
    [dir="rtl"] .st-side-cta:hover .st-arrow { transform: scaleX(-1); }
}
