/* ==========================================================================
   Sangeetha Softwares — Design System
   Derived from the SudokuZen app design language (dark theme, Nunito,
   green primary, gold accent). Single source of truth for every page.
   ========================================================================== */

/* ---- Tokens ----------------------------------------------------------- */
:root {
  /* Surfaces (darkest → lightest) */
  --bg: #0E1116;
  --bg-alt: #141922;
  --bg-gradient: linear-gradient(180deg, #11161F 0%, #0B0E13 100%);
  --surface: #1B2230;
  --surface-variant: #232C3D;
  --surface-raised: #232C3D;

  /* Brand */
  --primary: #4CAF50;
  --primary-dark: #2E7D32;
  --primary-light: #81C784;
  --primary-gradient: linear-gradient(135deg, #388E3C 0%, #2E7D32 100%);
  --primary-soft: rgba(76, 175, 80, 0.15);
  --primary-glow: 0 8px 30px rgba(76, 175, 80, 0.35);

  /* Accent */
  --gold: #FFC107;
  --gold-light: #FFD54F;
  --gold-soft: rgba(255, 193, 7, 0.15);

  /* Difficulty accents */
  --easy: #66BB6A;
  --medium: #FFA726;
  --hard: #EF5350;
  --expert: #AB47BC;
  --zen: #26A69A;

  /* Text */
  --text-primary: #ECEFF1;
  --text-secondary: #90A4AE;
  --text-muted: #78909C;

  /* Feedback */
  --success: #4CAF50;
  --error: #EF5350;
  --heart: #FF5252;

  /* Lines */
  --grid-line: #2A3340;
  --grid-line-bold: #3E4C5E;
  --border: #232C3D;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-xxl: 24px;
  --r-full: 999px;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;

  /* Layout */
  --container: 1140px;
  --header-h: 72px;

  /* Shadows */
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-button: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-elevated: 0 8px 20px rgba(0, 0, 0, 0.3);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-1: 150ms;
  --dur-2: 250ms;
  --dur-3: 400ms;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  background: var(--bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--dur-1) ease;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ---- Accessibility ----------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 0 0 var(--r-md) var(--r-md);
  font-weight: 800;
  transition: top var(--dur-2) var(--ease-out);
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* ---- Layout ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.container--narrow {
  max-width: 820px;
}

.section {
  padding-block: var(--sp-16);
}

.section--alt {
  background: var(--bg-alt);
}

.section--surface {
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
}

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: var(--sp-3);
}

.section__eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: var(--r-full);
  background: var(--primary-gradient);
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--sp-3);
}

.section__sub {
  max-width: 640px;
  font-size: 1.05rem;
}

.section__lead {
  max-width: 640px;
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
}

.section__head {
  margin-bottom: var(--sp-10);
}

.section__head--center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section__head--center .section__eyebrow::before {
  display: none;
}

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: 0.65rem 1.5rem;
  border-radius: var(--r-lg);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition:
    transform var(--dur-1) var(--ease-out),
    box-shadow var(--dur-1) ease,
    background-color var(--dur-1) ease,
    color var(--dur-1) ease,
    border-color var(--dur-1) ease;
  text-align: center;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: var(--primary-glow);
}

.btn--primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 34px rgba(76, 175, 80, 0.45);
}

.btn--gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #0B0E13;
  box-shadow: 0 8px 24px rgba(255, 193, 7, 0.3);
}

.btn--gold:hover {
  color: #0B0E13;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(255, 193, 7, 0.4);
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--surface-variant);
}

.btn--outline:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  transform: translateY(-1px);
}

.btn--ghost {
  background: var(--surface);
  color: var(--text-primary);
}

.btn--ghost:hover {
  background: var(--surface-variant);
  color: var(--text-primary);
}

.btn--sm {
  min-height: 40px;
  padding: 0.4rem 1rem;
  font-size: 14px;
  border-radius: var(--r-md);
}

.btn--md {
  min-height: 46px;
  padding: 0.55rem 1.4rem;
  font-size: 15px;
  border-radius: var(--r-md);
}

.btn--block {
  width: 100%;
}

.btn--lg {
  min-height: 54px;
  padding: 0.8rem 1.9rem;
  font-size: 17px;
}

/* ---- Header / Nav ------------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 17, 22, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(35, 44, 61, 0.6);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: var(--sp-4);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.nav__brand:hover {
  color: var(--text-primary);
}

.nav__brand img {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}

.nav__brand span {
  letter-spacing: 0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.nav__link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 15px;
  transition: color var(--dur-1) ease, background-color var(--dur-1) ease;
}

.nav__link:hover {
  color: var(--text-primary);
  background: var(--surface);
}

.nav__link[aria-current="page"] {
  color: var(--primary-light);
  background: var(--primary-soft);
}

.nav__cta {
  margin-left: var(--sp-2);
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
}

.nav__toggle:hover {
  background: var(--surface-variant);
}

.nav__toggle svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-primary);
}

.nav__toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.nav__toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.nav__toggle .icon-close {
  display: none;
}

@media (max-width: 900px) {
  .nav__toggle {
    display: inline-flex;
  }

  .nav__links {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-1);
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: var(--sp-4) var(--sp-5) var(--sp-6);
    box-shadow: var(--shadow-elevated);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity var(--dur-2) ease,
      transform var(--dur-2) var(--ease-out),
      visibility var(--dur-2);
  }

  .nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav__link {
    padding: 0.8rem var(--sp-4);
    font-size: 16px;
    border-radius: var(--r-md);
  }

  .nav__cta {
    margin: var(--sp-2) 0 0;
  }
}

/* ---- Hero (home) ------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-gradient);
}

.hero__grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
}

.hero__glow {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
  pointer-events: none;
}

.hero__glow--green {
  top: -160px;
  right: -120px;
  background: var(--primary);
}

.hero__glow--gold {
  bottom: -200px;
  left: -140px;
  background: var(--gold);
  opacity: 0.1;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--sp-12);
  align-items: center;
  min-height: calc(100dvh - var(--header-h));
  padding-block: var(--sp-16);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.4rem 0.9rem;
  border-radius: var(--r-full);
  background: var(--primary-soft);
  border: 1px solid rgba(76, 175, 80, 0.35);
  color: var(--primary-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}

.hero__title {
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-4);
}

.hero__title .grad {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 34rem;
  margin-bottom: var(--sp-8);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-10);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.hero__meta svg {
  width: 18px;
  height: 18px;
  stroke: var(--primary-light);
}

/* Product-page hero row (SudokuZen) */
.hero-row {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 340px);
  gap: var(--sp-10);
  align-items: center;
}

.hero-row__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.35rem 0.9rem;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
}

.hero-row__badge img {
  border-radius: 6px;
}

.hero-row__version {
  color: var(--text-muted);
  font-weight: 700;
}

.hero-row__visual .phone {
  margin-inline: auto;
}

.grad {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 900px) {
  .hero-row {
    grid-template-columns: 1fr;
  }

  .hero-row__visual {
    display: none;
  }
}


/* Phone mockups */
.phone {
  position: relative;
  width: 300px;
  aspect-ratio: 9 / 19.2;
  margin-inline: auto;
  border-radius: 42px;
  padding: 12px;
  background: linear-gradient(160deg, #232C3D, #141922);
  box-shadow:
    var(--shadow-elevated),
    0 30px 60px rgba(0, 0, 0, 0.5);
}

.phone::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 26px;
  border-radius: var(--r-full);
  background: #0B0E13;
  z-index: 3;
}

.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.phone__topbar {
  padding: 44px 14px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
}

.phone__hearts {
  display: flex;
  gap: 3px;
  color: var(--heart);
}

.phone__timer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.phone__board {
  margin: 6px 14px;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 8px;
  border: 1px solid var(--grid-line);
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 2px;
  background: var(--grid-line);
  border: 2px solid var(--grid-line-bold);
}

.board-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.board-grid--4 .board-cell {
  font-size: 15px;
}

.board-grid--6 {
  grid-template-columns: repeat(6, 1fr);
}

.board-grid--6 .board-cell {
  font-size: 13px;
}

.board-grid--thick .board-cell:nth-child(3n) {
  border-right: 2px solid var(--grid-line-bold);
}

.board-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--surface);
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-light);
}

.board-cell--given {
  color: #CFD8DC;
  background: #161C28;
}

.board-cell--selected {
  background: #2E4A33;
}

.board-cell--empty {
  background: #1B2230;
}

.board-cell--peer {
  background: #1E2734;
}

.phone__pad {
  margin: 6px 14px 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.phone__key {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--surface-variant);
  color: var(--primary-light);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 800;
}

.phone__key--gold {
  color: var(--gold);
}

.phone__caption {
  margin: auto 14px 14px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--primary-soft);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: var(--primary-light);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.phone--floating {
  animation: float 6s ease-in-out infinite;
}

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

/* Home app card in hero visual stack */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 480px;
}

@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
    min-height: 0;
    text-align: center;
  }

  .hero__sub {
    margin-inline: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__meta {
    justify-content: center;
  }

  .hero__visual {
    min-height: 460px;
  }
}

/* ---- Stats band -------------------------------------------------------- */
.stats {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-8);
  padding-block: var(--sp-10);
  text-align: center;
}

.stat__value {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat__value .plus {
  color: var(--primary-light);
}

.stat__value .gold {
  color: var(--gold);
}

.stat__label {
  margin-top: var(--sp-2);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-8) var(--sp-4);
  }
}

/* ---- Cards ------------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--sp-5);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }

  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  box-shadow: var(--shadow-card);
  transition:
    transform var(--dur-2) var(--ease-out),
    border-color var(--dur-2) ease,
    box-shadow var(--dur-2) ease;
}

.card--hover:hover {
  transform: translateY(-6px);
  border-color: rgba(76, 175, 80, 0.4);
  box-shadow: var(--shadow-elevated);
}

.card--accent {
  border-color: rgba(76, 175, 80, 0.3);
  background: linear-gradient(180deg, #1C2433, #181F2C);
}

.card--gold {
  border-color: rgba(255, 193, 7, 0.35);
}

.card__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-4);
}

.card__icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--primary-light);
}

.card__icon--primary {
  background: var(--primary-soft);
}

.card__icon--gold {
  background: var(--gold-soft);
}

.card__icon--gold svg {
  stroke: var(--gold);
}

.card__icon--purple {
  background: rgba(171, 71, 188, 0.14);
}

.card__icon--purple svg {
  stroke: #AB47BC;
}

.card__icon--blue {
  background: rgba(66, 165, 245, 0.14);
}

.card__icon--blue svg {
  stroke: #42A5F5;
}

.card__icon--teal {
  background: rgba(38, 166, 154, 0.14);
}

.card__icon--teal svg {
  stroke: #26A69A;
}

.card__title {
  font-size: 1.2rem;
  margin-bottom: var(--sp-2);
}

.card__text {
  font-size: 15px;
  margin-bottom: var(--sp-4);
}

.pricing-list {
  display: grid;
  gap: var(--sp-2);
  margin: var(--sp-4) 0;
}

.pricing-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: 14px;
  color: var(--text-secondary);
}

.pricing-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.card--gold .pricing-list li::before {
  background: var(--gold);
}

.pricing-note {
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--border);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-muted);
}

.card--gold .pricing-note {
  color: var(--gold-light);
}

.card--accent,
.card--gold {
  display: flex;
  flex-direction: column;
}

.card__link {
  font-weight: 800;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}

.card__link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  transition: transform var(--dur-1) ease;
}

.card__link:hover svg {
  transform: translateX(3px);
}

/* ---- App showcase card -------------------------------------------------- */
.app-card {
  position: relative;
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: var(--sp-5);
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  box-shadow: var(--shadow-card);
  transition:
    transform var(--dur-2) var(--ease-out),
    border-color var(--dur-2) ease,
    box-shadow var(--dur-2) ease;
}

.app-card--featured {
  grid-template-columns: 150px 1fr;
  border-color: rgba(76, 175, 80, 0.35);
  background: linear-gradient(180deg, #1C2433, #171E2B);
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}

.app-card__icon {
  width: 132px;
  height: 132px;
  border-radius: 30px;
  box-shadow: var(--shadow-elevated);
}

.app-card__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--sp-2);
}

.app-card__title {
  font-size: 1.5rem;
  margin-bottom: var(--sp-2);
}

.app-card__tagline {
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
  font-size: 15px;
}

.app-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.3rem 0.75rem;
  border-radius: var(--r-full);
  background: var(--surface-variant);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid transparent;
}

.chip--green {
  background: var(--primary-soft);
  color: var(--primary-light);
}

.chip--gold {
  background: var(--gold-soft);
  color: var(--gold-light);
}

.chip--blue {
  background: rgba(66, 165, 245, 0.14);
  color: #64B5F6;
}

.chip--red {
  background: rgba(239, 83, 80, 0.14);
  color: #EF9A9A;
}

.chip svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

@media (max-width: 560px) {
  .app-card,
  .app-card--featured {
    grid-template-columns: 1fr;
  }

  .app-card__icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
  }
}

.app-card__icon--soon {
  display: grid;
  place-items: center;
  background: var(--surface-variant);
  border: 1px dashed var(--grid-line-bold);
  color: var(--text-muted);
}

.app-card__icon--soon svg {
  width: 46px;
  height: 46px;
  stroke: currentColor;
}

.app-card__tag--muted {
  color: var(--text-muted);
}

/* ---- Difficulty pills (SudokuZen page) ---------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.45rem 1rem;
  border-radius: var(--r-full);
  font-weight: 800;
  font-size: 14px;
  border: 1px solid;
}

.pill svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.pill--easy {
  color: var(--easy);
  background: rgba(102, 187, 106, 0.12);
  border-color: rgba(102, 187, 106, 0.35);
}

.pill--medium {
  color: var(--medium);
  background: rgba(255, 167, 38, 0.12);
  border-color: rgba(255, 167, 38, 0.35);
}

.pill--hard {
  color: var(--hard);
  background: rgba(239, 83, 80, 0.12);
  border-color: rgba(239, 83, 80, 0.35);
}

.pill--expert {
  color: var(--expert);
  background: rgba(171, 71, 188, 0.12);
  border-color: rgba(171, 71, 188, 0.35);
}

.pill--zen {
  color: var(--zen);
  background: rgba(38, 166, 154, 0.12);
  border-color: rgba(38, 166, 154, 0.35);
}

/* ---- Feature split rows ------------------------------------------------ */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: center;
  padding-block: var(--sp-12);
}

.feature--reverse .feature__visual {
  order: -1;
}

.feature__kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-3);
}

.feature__kicker--green {
  color: var(--primary-light);
}

.feature__kicker--gold {
  color: var(--gold);
}

.feature__title {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  margin-bottom: var(--sp-3);
}

.feature__text {
  margin-bottom: var(--sp-4);
  max-width: 30rem;
}

.feature__points {
  display: grid;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.feature__point {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
}

.feature__point-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--primary-soft);
}

.feature__point-icon svg {
  width: 15px;
  height: 15px;
  stroke: var(--primary-light);
}

.feature__point strong {
  color: var(--text-primary);
  font-weight: 800;
  display: block;
}

@media (max-width: 900px) {
  .feature {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }

  .feature--reverse .feature__visual {
    order: 0;
  }
}

/* Visual panels used inside feature rows */
.panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xxl);
  padding: var(--sp-8);
  box-shadow: var(--shadow-elevated);
}

.panel__label {
  position: absolute;
  top: var(--sp-5);
  left: var(--sp-6);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.panel__label svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-muted);
}

.panel__note {
  margin-top: var(--sp-5);
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.panel__note a {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Mini sudoku board (visual) */
.mini-board {
  width: min(260px, 100%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 3px;
  background: var(--grid-line-bold);
  padding: 3px;
  border-radius: var(--r-md);
}

.mini-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--surface);
  font-size: 15px;
  font-weight: 800;
  border-radius: 3px;
}

.mini-cell--given {
  color: #CFD8DC;
  background: #161C28;
}

.mini-cell--user {
  color: var(--primary-light);
}

.mini-cell--sel {
  background: #2E4A33;
  color: var(--primary-light);
  box-shadow: inset 0 0 0 1.5px var(--primary);
}

/* Streak dots visual */
.streak-row {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  flex-wrap: wrap;
}

.streak-dots {
  display: flex;
  gap: var(--sp-3);
}

.streak-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--bg);
}

.streak-dot--done {
  background: var(--success);
}

.streak-dot--today {
  background: transparent;
  border: 2px solid var(--success);
  color: var(--success);
}

.streak-dot--missed {
  background: var(--error);
}

.streak-dot--todo {
  background: var(--surface-variant);
  color: var(--text-muted);
}

.streak-count {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-primary);
}

.streak-count svg {
  width: 30px;
  height: 30px;
  stroke: var(--medium);
}

/* Quick game sizes visual */
.size-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}

.size-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: var(--surface-variant);
  border-radius: var(--r-lg);
  color: var(--primary-light);
  font-weight: 900;
  font-size: 1.15rem;
  border: 1px solid var(--grid-line);
}

.size-tile small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Traits bars visual */
.trait-list {
  display: grid;
  gap: var(--sp-4);
}

.trait {
  display: grid;
  gap: 6px;
}

.trait__head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
}

.trait__head span:first-child {
  color: var(--text-primary);
}

.trait__head span:last-child {
  color: var(--text-secondary);
}

.trait__bar {
  height: 8px;
  border-radius: var(--r-full);
  background: var(--surface-variant);
  overflow: hidden;
}

.trait__bar i {
  display: block;
  height: 100%;
  border-radius: var(--r-full);
  background: var(--primary-gradient);
}

/* ---- CTA band ----------------------------------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--primary-gradient);
  color: #fff;
  text-align: center;
  padding-block: var(--sp-16);
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 7, 0.28);
}

.cta-band::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.cta-band > * {
  position: relative;
  z-index: 1;
}

.cta-band__title {
  color: #fff;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin-bottom: var(--sp-3);
}

.cta-band__text {
  color: rgba(255, 255, 255, 0.92);
  max-width: 560px;
  margin: 0 auto var(--sp-8);
}

.cta-band .btn--dark {
  background: #0E1116;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.cta-band .btn--dark:hover {
  background: #1B2230;
  color: #fff;
  transform: translateY(-1px);
}

/* ---- Page hero (subpages) ---------------------------------------------- */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-gradient);
  border-bottom: 1px solid var(--border);
  padding-block: var(--sp-12);
}

.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: var(--sp-3);
}

.page-hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--sp-3);
}

.page-hero__sub {
  max-width: 620px;
  font-size: 1.05rem;
}

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
}

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

.breadcrumb a:hover {
  color: var(--primary-light);
}

.breadcrumb span {
  color: var(--text-secondary);
}

.breadcrumb svg {
  width: 13px;
  height: 13px;
  stroke: var(--text-muted);
}

/* ---- FAQ ---------------------------------------------------------------- */
.faq {
  display: grid;
  gap: var(--sp-3);
  max-width: 760px;
}

.faq__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  text-align: left;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  transition: background-color var(--dur-1) ease;
}

.faq__q:hover {
  background: var(--surface-variant);
}

.faq__q svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  stroke: var(--primary-light);
  transition: transform var(--dur-2) var(--ease-out);
}

.faq__item.is-open .faq__q svg {
  transform: rotate(180deg);
}

.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-3) var(--ease-out);
}

.faq__a-inner {
  padding: 0 var(--sp-5) var(--sp-5);
  color: var(--text-secondary);
  font-size: 15px;
}

.faq__a p + p {
  margin-top: var(--sp-3);
}

/* ---- Legal pages -------------------------------------------------------- */
.legal {
  max-width: 760px;
}

.legal__updated {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.35rem 0.8rem;
  border-radius: var(--r-full);
  background: var(--primary-soft);
  color: var(--primary-light);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: var(--sp-8);
}

.legal h2 {
  font-size: 1.4rem;
  margin: var(--sp-10) 0 var(--sp-3);
  scroll-margin-top: calc(var(--header-h) + var(--sp-4));
}

.legal h3 {
  font-size: 1.1rem;
  margin: var(--sp-6) 0 var(--sp-2);
}

.legal p {
  margin-bottom: var(--sp-4);
}

.legal ul {
  list-style: none;
  margin-bottom: var(--sp-4);
  display: grid;
  gap: var(--sp-2);
}

.legal ul li {
  position: relative;
  padding-left: var(--sp-5);
}

.legal ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--primary-gradient);
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--sp-4);
  font-size: 14.5px;
}

.legal th,
.legal td {
  text-align: left;
  padding: var(--sp-3);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.legal th {
  color: var(--text-primary);
  font-weight: 800;
  background: var(--bg-alt);
}

.legal .toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-8);
}

.legal .toc p {
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
}

.legal .toc ol {
  list-style: none;
  counter-reset: toc;
  display: grid;
  gap: 6px;
}

.legal .toc ol li {
  counter-increment: toc;
  padding-left: 0;
}

.legal .toc ol li::before {
  content: counter(toc) ".";
  display: none;
}

.legal .toc ol a {
  color: var(--text-secondary);
}

.legal .toc ol a:hover {
  color: var(--primary-light);
}

/* ---- Contact / support --------------------------------------------------- */
.contact-card {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-4);
}

.contact-card__icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--primary-soft);
}

.contact-card__icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--primary-light);
}

.contact-card h3 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.contact-card p {
  font-size: 14.5px;
  margin-bottom: 0;
}

.contact-card a {
  font-weight: 800;
}

.form {
  display: grid;
  gap: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
}

.form__row {
  display: grid;
  gap: var(--sp-4);
}

.form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--r-md);
  border: 1.5px solid var(--surface-variant);
  background: var(--bg);
  color: var(--text-primary);
  font: inherit;
  transition: border-color var(--dur-1) ease, box-shadow var(--dur-1) ease;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.25);
}

.form textarea {
  min-height: 140px;
  resize: vertical;
}

.form__hint {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

@media (min-width: 640px) {
  .form__row--2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- Footer ------------------------------------------------------------- */
.footer {
  background: #0A0D12;
  border-top: 1px solid var(--border);
  padding-top: var(--sp-16);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--sp-10);
  padding-bottom: var(--sp-12);
}

.footer__brand p {
  margin-top: var(--sp-4);
  font-size: 14.5px;
  max-width: 30rem;
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.footer__logo img {
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
}

.footer h4 {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
}

.footer__links {
  display: grid;
  gap: var(--sp-2);
}

.footer__links a {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
}

.footer__links a:hover {
  color: var(--primary-light);
}

.footer__social {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.footer__social a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition:
    color var(--dur-1) ease,
    background-color var(--dur-1) ease,
    transform var(--dur-1) ease;
}

.footer__social a:hover {
  background: var(--surface-variant);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.footer__social svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  stroke: none;
}

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-block: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  color: var(--text-muted);
  font-size: 13.5px;
}

.footer__bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.footer__bottom-links a {
  color: var(--text-muted);
}

.footer__bottom-links a:hover {
  color: var(--primary-light);
}

@media (max-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
}

/* ---- Misc helpers ------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: var(--sp-4);
}

.mt-8 {
  margin-top: var(--sp-8);
}

.mb-0 {
  margin-bottom: 0;
}

.divider {
  height: 1px;
  background: var(--border);
  border: 0;
  margin-block: var(--sp-12);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

.avatar {
  border-radius: 50%;
  object-fit: cover;
}

/* Timeline (about page) */
.timeline {
  position: relative;
  display: grid;
  gap: var(--sp-6);
  padding-left: var(--sp-8);
  max-width: 640px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--grid-line-bold));
}

.timeline__item {
  position: relative;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--sp-8) + 2px);
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.15);
}

.timeline__year {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-light);
}

.timeline__item h3 {
  font-size: 1.05rem;
  margin: 4px 0 4px;
}

.timeline__item p {
  font-size: 15px;
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* 404 page */
.notfound {
  min-height: calc(100dvh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--sp-12) var(--sp-5);
}

.notfound__code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 900;
  line-height: 1;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.notfound h1 {
  margin: var(--sp-3) 0 var(--sp-2);
}

.notfound p {
  max-width: 420px;
  margin: 0 auto var(--sp-8);
}

.notfound__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
}
