/**
 * Sargarmia Landing Page — Brand Theme Styles
 * Color palette extracted from official brand cards
 * Input: CSS custom properties from config/site.json (applied via JS)
 * Output: Styled landing page matching Sargarmia visual identity
 */

/* ── Design tokens (defaults, overridden by JS from config) ── */
:root {
  --color-purple: #6c3494;
  --color-blue: #008fcf;
  --color-orange: #f79539;
  --color-teal: #00a19f;
  --color-pink: #e35b7b;
  --color-bg: #F2F2F2;
  --color-surface: #FFFFFF;
  --color-text: #3f0c58;
  --color-text-muted: #6B5B8C;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 10px rgba(108, 52, 148, 0.06);
  --shadow-md: 0 6px 24px rgba(108, 52, 148, 0.09);
  --shadow-lg: 0 14px 40px rgba(108, 52, 148, 0.11);

  --font: "Vazirmatn", "Tahoma", system-ui, sans-serif;
  --max-width: 440px;
  --space-page-x: 1rem;
  --space-page-y: 1.25rem;
  --space-stack: 0.95rem;
  --section-pad: 1.15rem 1.1rem;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

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

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

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* ── Decorative elements (puzzle pieces from brand cards) ── */
.decor {
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

.decor--tl,
.decor--tr,
.decor--bl,
.decor--br {
  width: 72px;
  height: 72px;
  border-radius: 0 0 50% 0;
  opacity: 0.72;
}

.decor--tl {
  top: -8px;
  left: -8px;
  background: var(--color-purple);
  border-radius: 0 0 60% 0;
  transform: rotate(0deg);
}

.decor--tr {
  top: -8px;
  right: -8px;
  background: var(--color-orange);
  border-radius: 0 0 0 60%;
}

.decor--bl {
  bottom: -8px;
  left: -8px;
  background: var(--color-pink);
  border-radius: 0 60% 0 0;
}

.decor--br {
  bottom: -8px;
  right: -8px;
  background: var(--color-blue);
  border-radius: 60% 0 0 0;
}

.decor--plus {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-teal);
  opacity: 0.35;
}

.decor--plus-1 { top: 18%; left: 6%; }
.decor--plus-2 { top: 35%; right: 5%; }

.decor--dots {
  width: 20px;
  height: 20px;
  background-image: radial-gradient(circle, var(--color-purple) 2px, transparent 2px);
  background-size: 8px 8px;
  opacity: 0.28;
}

.decor--dots-1 { bottom: 25%; right: 8%; }
.decor--dots-2 { top: 50%; left: 4%; background-image: radial-gradient(circle, var(--color-orange) 2px, transparent 2px); }

/* ── App container ── */
.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding:
    calc(var(--space-page-y) + var(--safe-top))
    var(--space-page-x)
    calc(2.25rem + var(--safe-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: var(--space-stack);
}

/* ── Loader ── */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 60dvh;
  color: var(--color-text-muted);
}

.loader__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(108, 52, 148, 0.15);
  border-top-color: var(--color-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Hero section ── */
.hero {
  text-align: center;
  padding: 0.5rem 0 0.15rem;
  animation: fadeUp 0.6s ease-out;
}

.hero__logo {
  width: min(168px, 46vw);
  height: auto;
  margin: 0 auto 0.75rem;
  display: block;
  filter: drop-shadow(var(--shadow-sm));
}

.hero__tagline {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.55rem;
  line-height: 1.55;
}

.hero__badge {
  display: inline-block;
  background: var(--color-teal);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.42rem 1.05rem;
  border-radius: var(--radius-pill);
  line-height: 1.45;
  max-width: 100%;
}

/* ── Section card ── */
.section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--section-pad);
  box-shadow: var(--shadow-md);
  animation: fadeUp 0.6s ease-out backwards;
}

.section:nth-child(2) { animation-delay: 0.05s; }
.section:nth-child(3) { animation-delay: 0.1s; }
.section:nth-child(4) { animation-delay: 0.15s; }
.section:nth-child(5) { animation-delay: 0.2s; }
.section:nth-child(6) { animation-delay: 0.25s; }
.section:nth-child(7) { animation-delay: 0.3s; }
.section:nth-child(8) { animation-delay: 0.35s; }

.section__title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--color-purple);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.4;
}

.section__title svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Contact links ── */
.links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid transparent;
  min-height: 56px;
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  outline: none;
}

.link-card:focus-visible {
  border-color: var(--color-purple);
}

.link-card__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.link-card__icon svg {
  width: 20px;
  height: 20px;
}

.link-card__icon--orange { background: rgba(247, 149, 57, 0.14); color: var(--color-orange); }
.link-card__icon--blue   { background: rgba(0, 143, 207, 0.14); color: var(--color-blue); }
.link-card__icon--pink   { background: rgba(227, 91, 123, 0.14); color: var(--color-pink); }
.link-card__icon--purple { background: rgba(108, 52, 148, 0.14); color: var(--color-purple); }
.link-card__icon--teal   { background: rgba(0, 161, 159, 0.14); color: var(--color-teal); }

.link-card__body {
  flex: 1;
  min-width: 0;
}

.link-card__label {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-weight: 500;
  line-height: 1.3;
}

.link-card__value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text);
  direction: ltr;
  text-align: right;
  line-height: 1.35;
  word-break: break-word;
}

.link-card__arrow {
  color: var(--color-text-muted);
  opacity: 0.45;
  flex-shrink: 0;
}

.link-card__arrow svg {
  width: 16px;
  height: 16px;
}

/* ── Text section ── */
.text-section__content {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* ── Features grid ── */
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.feature-card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 0.9rem 0.7rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border: 2px solid transparent;
}

.feature-card--link:hover,
.feature-card--link:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  outline: none;
  border-color: rgba(108, 52, 148, 0.18);
}

.feature-card:hover {
  transform: translateY(-1px);
}

.feature-card__icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-card__icon svg {
  width: 26px;
  height: 26px;
}

.feature-card__icon--teal   { color: var(--color-teal); }
.feature-card__icon--purple { color: var(--color-purple); }
.feature-card__icon--orange { color: var(--color-orange); }
.feature-card__icon--pink   { color: var(--color-pink); }

.feature-card__title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.2rem;
  line-height: 1.35;
}

.feature-card__desc {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ── Game hub + mini-games (brand palette) ── */
.gh-hub {
  background:
    radial-gradient(circle at 12% 18%, rgba(247, 149, 57, 0.14), transparent 40%),
    radial-gradient(circle at 88% 8%, rgba(0, 143, 207, 0.12), transparent 42%),
    radial-gradient(circle at 50% 100%, rgba(108, 52, 148, 0.07), transparent 45%),
    var(--color-surface);
}

.gh-hub__head {
  text-align: center;
  margin-bottom: 0.85rem;
}

.gh-hub__logo {
  width: min(140px, 48vw);
  height: auto;
  margin: 0 auto 0.55rem;
  display: block;
}

.gh-hub__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-purple);
  margin-bottom: 0.3rem;
  line-height: 1.35;
}

.gh-hub__sub {
  font-size: 0.84rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.gh-hub__keys {
  margin-top: 0.4rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--color-teal);
}

.gh-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.gh-card {
  border: 0;
  border-radius: 16px;
  padding: 0.8rem 0.65rem;
  text-align: center;
  cursor: pointer;
  color: #fff;
  font-family: var(--font);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.gh-card:active {
  transform: scale(0.98);
}

.gh-card--orange { background: linear-gradient(145deg, #f79539, #ffb347); color: #3f0c58; }
.gh-card--blue { background: linear-gradient(145deg, #008fcf, #4db7ea); }
.gh-card--purple { background: linear-gradient(145deg, #6c3494, #8a56b8); }
.gh-card--teal { background: linear-gradient(145deg, #00a19f, #2bb8b5); }
.gh-card--pink { background: linear-gradient(145deg, #e35b7b, #f2809c); }

.gh-card__badge {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  opacity: 0.9;
  background: rgba(255,255,255,0.22);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
}

.gh-card__title {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.3;
}

.gh-card__desc {
  font-size: 0.68rem;
  line-height: 1.4;
  opacity: 0.92;
}

.gh-btn {
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.62rem 0.75rem;
  cursor: pointer;
  min-height: 40px;
}

.gh-btn--ghost {
  background: rgba(108, 52, 148, 0.08);
  color: var(--color-purple);
}

.gh-btn--primary {
  background: linear-gradient(135deg, var(--color-teal), #2bb8b5);
  color: #fff;
}

.gh-play__bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.gh-play__title {
  text-align: center;
  font-size: 0.88rem;
  color: var(--color-purple);
}

.gh-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: 0.55rem;
  line-height: 1.65;
}

.gh-score {
  text-align: center;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--color-purple);
  margin-top: 0.5rem;
}

.gh-input {
  width: 100%;
  border: 2px solid rgba(108, 52, 148, 0.12);
  border-radius: 14px;
  padding: 0.7rem 0.85rem;
  font-family: var(--font);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  background: var(--color-bg);
  color: var(--color-text);
}

.gh-win {
  margin-top: 0.75rem;
  text-align: center;
}

.gh-win__text {
  font-weight: 700;
  color: var(--color-teal);
  margin-bottom: 0.55rem;
  line-height: 1.65;
  font-size: 0.88rem;
}

.car-stage,
.rain-stage {
  border-radius: 14px;
  overflow: hidden;
  background: #eef2f5;
}

.car-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

#carCanvas,
#jumpCanvas {
  width: 100%;
  height: auto;
  display: block;
  background: #eef2f5;
  border-radius: 14px;
}

.xo-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: min(280px, 100%);
  margin: 0 auto;
  border: 3px solid var(--color-purple);
  border-radius: 14px;
  overflow: hidden;
  background: var(--color-purple);
}

.xo-cell {
  aspect-ratio: 1;
  border: 0;
  border-radius: 0;
  background: #fff;
  font-size: clamp(1.35rem, 5vw, 1.7rem);
  font-weight: 800;
  font-family: var(--font);
  cursor: pointer;
  color: var(--color-purple);
  box-shadow: inset 0 0 0 2px rgba(108, 52, 148, 0.35);
}

.xo-cell.xo-x { color: var(--color-orange); background: rgba(247,149,57,0.12); }
.xo-cell.xo-o { color: var(--color-blue); background: rgba(0,143,207,0.12); }
.xo-cell.is-focused {
  outline: 3px solid var(--color-teal);
  outline-offset: -3px;
  z-index: 1;
}

.rain-stage {
  position: relative;
  height: min(260px, 52vw);
  min-height: 220px;
  border: 2px dashed rgba(108, 52, 148, 0.15);
}

.rain-basket {
  position: absolute;
  bottom: 10px;
  width: 64px;
  height: 22px;
  margin-left: -32px;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, #008fcf, #6c3494);
  box-shadow: 0 4px 10px rgba(108, 52, 148, 0.25);
  z-index: 5;
  pointer-events: none;
}

.rain-item {
  position: absolute;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 14px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.rain-item--good { background: var(--color-orange); box-shadow: 0 4px 12px rgba(247,149,57,0.35); }
.rain-item--bad { background: var(--color-purple); opacity: 0.9; }

.rain-dice,
.rain-block {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #fff;
}

.rain-dice {
  box-shadow: inset 0 0 0 2px rgba(108, 52, 148, 0.15);
}

.mm-card.is-focused {
  outline: 3px solid var(--color-teal);
  outline-offset: 2px;
  border-radius: 16px;
}

.mm-card__logo--dice {
  width: 78%;
  max-height: 78%;
  object-fit: contain;
}

.mm-card__face--back {
  background: linear-gradient(145deg, #eaf6fc, #ffffff);
}

.guess-box {
  max-width: 280px;
  margin: 0 auto;
  width: 100%;
}

/* Memory Match cards */
.mm-game {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(247, 149, 57, 0.14), transparent 42%),
    radial-gradient(circle at 85% 0%, rgba(0, 143, 207, 0.12), transparent 40%),
    var(--color-surface);
}

.mm-game__head {
  text-align: center;
  margin-bottom: 0.75rem;
}

.mm-game__title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--color-purple);
  margin-bottom: 0.3rem;
}

.mm-game__sub {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 0.55rem;
}

.mm-game__stats {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--color-text);
  direction: ltr;
  unicode-bidi: isolate;
}

.mm-game__stats span {
  background: var(--color-bg);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.65rem;
}

.mm-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.75rem 0 0.7rem;
  direction: ltr;
  min-height: 200px;
}

.mm-card {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100px;
  min-height: 100px;
  cursor: pointer;
  position: relative;
  display: block;
}

.mm-card__inner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mm-card__face {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.mm-card__face--back {
  background: linear-gradient(145deg, var(--color-purple), #2f1b55);
  color: #fff;
  opacity: 1;
  z-index: 2;
}

.mm-card__face--front {
  background: #fff;
  border: 2px solid rgba(108, 52, 148, 0.12);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.mm-card.is-flipped .mm-card__face--back,
.mm-card.is-matched .mm-card__face--back {
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.mm-card.is-flipped .mm-card__face--front,
.mm-card.is-matched .mm-card__face--front {
  opacity: 1;
  z-index: 2;
}

.mm-card__mark {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
}

.mm-card__face--front svg {
  width: 44%;
  height: 44%;
}

.mm-card__face--orange { color: var(--color-orange); }
.mm-card__face--teal { color: var(--color-teal); }
.mm-card__face--blue { color: var(--color-blue); }
.mm-card__face--purple { color: var(--color-purple); }
.mm-card__face--pink { color: var(--color-pink); }

.mm-card__logo {
  width: 70%;
  height: auto;
  max-height: 68%;
  object-fit: contain;
  pointer-events: none;
}

.mm-card.is-matched .mm-card__face--front {
  box-shadow: 0 0 0 2px rgba(0, 161, 159, 0.35), var(--shadow-md);
}

.mm-game__actions {
  display: flex;
  gap: 0.5rem;
}

.mm-btn {
  flex: 1;
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.84rem;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  min-height: 44px;
}

.mm-btn--ghost {
  background: rgba(108, 52, 148, 0.08);
  color: var(--color-purple);
}

.mm-btn--primary {
  background: linear-gradient(135deg, var(--color-orange), #ffb347);
  color: #3f0c58;
  box-shadow: 0 6px 16px rgba(247, 149, 57, 0.26);
}

.mm-win {
  margin-top: 0.75rem;
  text-align: center;
  animation: fadeUp 0.45s ease;
}

.mm-win__text {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--color-teal);
  margin-bottom: 0.6rem;
  line-height: 1.65;
}

.mm-game--won {
  box-shadow: 0 0 0 2px rgba(0, 161, 159, 0.2), var(--shadow-md);
}

.newsletter--pulse {
  animation: newsletterPulse 1.4s ease;
}

@keyframes newsletterPulse {
  0%, 100% { box-shadow: var(--shadow-md); }
  40% { box-shadow: 0 0 0 4px rgba(0, 161, 159, 0.28), var(--shadow-lg); }
}

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

/* ── Newsletter CTA form ── */
.newsletter {
  text-align: center;
  background:
    radial-gradient(circle at top right, rgba(247, 149, 57, 0.1), transparent 40%),
    radial-gradient(circle at bottom left, rgba(0, 143, 207, 0.08), transparent 42%),
    var(--color-surface);
}

.newsletter__badge {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.6rem;
  color: var(--color-teal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.newsletter__badge svg {
  width: 32px;
  height: 32px;
}

.newsletter__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-purple);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.newsletter__content {
  font-size: 0.86rem;
  color: var(--color-text-muted);
  margin-bottom: 0.95rem;
  line-height: 1.75;
}

.newsletter__form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-align: right;
}

.newsletter__row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.newsletter__label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.newsletter__input {
  width: 100%;
  border: 2px solid rgba(108, 52, 148, 0.12);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.85rem;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--color-text);
  min-height: 46px;
}

.newsletter__input:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(0, 161, 159, 0.12);
}

.newsletter__submit {
  margin-top: 0.25rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--color-teal), #009b7f);
  color: #fff;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.85rem 1.15rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 161, 159, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 48px;
  width: 100%;
}

.newsletter__submit:hover,
.newsletter__submit:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 161, 159, 0.32);
  outline: none;
}

.newsletter__submit:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.newsletter__hint {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.55;
}

.newsletter__msg {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 0.2rem;
}

.newsletter__msg--ok { color: var(--color-teal); }
.newsletter__msg--err { color: var(--color-pink); }
.newsletter__msg--pending { color: var(--color-text-muted); }

/* ── Discount banner ── */
.banner {
  border: 2px dashed rgba(108, 52, 148, 0.35);
  background: linear-gradient(135deg, rgba(108, 52, 148, 0.04), rgba(0, 161, 159, 0.04));
  text-align: center;
}

.banner__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.65rem;
  color: var(--color-purple);
}

.banner__icon svg {
  width: 100%;
  height: 100%;
}

.banner__title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--color-purple);
  margin-bottom: 0.3rem;
}

.banner__content {
  font-size: 0.84rem;
  color: var(--color-text-muted);
  margin-bottom: 0.65rem;
}

.banner__code {
  display: inline-block;
  background: var(--color-purple);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0.55rem 1.35rem;
  border-radius: var(--radius-sm);
  direction: ltr;
}

.banner__placeholder {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border: 2px dashed rgba(108, 52, 148, 0.4);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 0.84rem;
}

/* ── CTA button ── */
.cta.section,
.cta {
  text-align: center;
  background: transparent;
  box-shadow: none;
  padding: 0.15rem 0;
  border-radius: 0;
}

.cta--solo {
  padding: 0.1rem 0 0.25rem;
}

.cta__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  background: var(--color-teal);
  color: #fff;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 161, 159, 0.28);
  min-height: 48px;
}

.cta__button:hover,
.cta__button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 161, 159, 0.34);
  outline: none;
}

.cta__button svg {
  width: 18px;
  height: 18px;
}

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 0.65rem 0 0.25rem;
  animation: fadeUp 0.6s ease-out 0.3s backwards;
}

.footer__icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  opacity: 0.7;
}

.footer__icons--image {
  opacity: 1;
  gap: 0;
}

.footer__icons-img {
  width: min(100%, 280px);
  height: auto;
  display: block;
  margin: 0 auto 0.15rem;
}

.footer__icons svg {
  width: 24px;
  height: 24px;
}

.footer__icons .icon-teal   { color: var(--color-teal); }
.footer__icons .icon-blue   { color: var(--color-blue); }
.footer__icons .icon-purple { color: var(--color-purple); }
.footer__icons .icon-orange { color: var(--color-orange); }
.footer__icons .icon-pink   { color: var(--color-pink); }

.footer__copy {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ── Animations ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive: small phones ── */
@media (max-width: 360px) {
  :root {
    --space-page-x: 0.85rem;
    --space-stack: 0.8rem;
    --section-pad: 1rem 0.9rem;
  }

  .hero__logo {
    width: min(148px, 52vw);
  }

  .gh-card {
    min-height: 98px;
    padding: 0.65rem 0.5rem;
  }

  .gh-card__title {
    font-size: 0.8rem;
  }

  .mm-card {
    height: 88px;
    min-height: 88px;
  }
}

/* ── Responsive: tablet / desktop ── */
@media (min-width: 520px) {
  :root {
    --max-width: 520px;
    --space-page-x: 1.35rem;
    --space-page-y: 1.75rem;
    --space-stack: 1.15rem;
    --section-pad: 1.35rem 1.35rem;
  }

  .decor--tl, .decor--tr, .decor--bl, .decor--br {
    width: 100px;
    height: 100px;
    opacity: 0.8;
  }

  .hero {
    padding: 0.75rem 0 0.25rem;
  }

  .hero__logo {
    width: min(190px, 42vw);
    margin-bottom: 0.9rem;
  }

  .hero__tagline {
    font-size: 1.05rem;
  }

  .hero__badge {
    font-size: 0.84rem;
    padding: 0.48rem 1.2rem;
  }

  .section__title {
    font-size: 1.05rem;
    margin-bottom: 1rem;
  }

  .features {
    gap: 0.8rem;
  }

  .feature-card {
    padding: 1.05rem 0.9rem;
  }

  .feature-card__title {
    font-size: 0.86rem;
  }

  .feature-card__desc {
    font-size: 0.74rem;
  }

  .gh-grid {
    gap: 0.75rem;
  }

  .gh-card {
    min-height: 120px;
    padding: 1rem 0.85rem;
  }

  .gh-card__title {
    font-size: 0.95rem;
  }

  .gh-card__desc {
    font-size: 0.72rem;
  }

  .mm-card {
    height: 112px;
    min-height: 112px;
  }

  .mm-board {
    gap: 0.7rem;
  }

  .cta__button {
    max-width: 360px;
  }

  .footer__icons-img {
    width: min(100%, 320px);
  }

  .newsletter__title {
    font-size: 1.12rem;
  }

  .rain-stage {
    height: 280px;
  }

  .rain-item {
    width: 64px;
    height: 64px;
  }
}

@media (min-width: 768px) {
  :root {
    --max-width: 560px;
    --space-page-x: 1.5rem;
    --space-page-y: 2.25rem;
    --space-stack: 1.3rem;
    --section-pad: 1.5rem 1.5rem;
  }

  .decor--plus,
  .decor--dots {
    opacity: 0.4;
  }

  .hero__logo {
    width: 200px;
  }

  .text-section__content {
    font-size: 0.94rem;
  }

  .link-card {
    padding: 0.9rem 1.05rem;
  }

  .gh-hub__title {
    font-size: 1.15rem;
  }

  .cta__button {
    font-size: 1rem;
    max-width: 380px;
  }
}

@media (min-width: 1024px) {
  :root {
    --max-width: 600px;
  }

  .app {
    padding-bottom: calc(3rem + var(--safe-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
