/* ===========================================================================
   PNative Apps — shared styles
   Plain CSS, mobile-first, no build step.
   =========================================================================== */

:root {
  --bg: #0b1020;
  --bg-soft: #121933;
  --surface: #161f3d;
  --surface-2: #1d2950;
  --border: #2a3766;
  --text: #eaeefb;
  --text-muted: #a7b0d0;
  --brand: #5b8cff;
  --brand-2: #8a5bff;
  --accent: #2bd4a4;
  --danger: #ff6b6b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --maxw: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 80% -10%, #1a2350 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 10%, #241a4d 0%, transparent 55%), var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 16, 32, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  flex: 0 0 auto;
}

.hero-logo {
  width: 128px;
  height: 128px;
  margin: 0 auto 24px;
  border-radius: 28px;
  object-fit: contain;
  display: block;
  box-shadow: 0 14px 40px rgba(91, 140, 255, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn:hover {
  text-decoration: none;
}

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

.btn-primary:hover {
  filter: brightness(1.08);
}

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

.btn-ghost:hover {
  background: var(--surface-2);
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 48px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #fff, #b9c6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Section ---------- */
.section {
  padding: 48px 0;
}

.section-title {
  font-size: 1.8rem;
  margin: 0 0 6px;
}

.section-subtitle {
  color: var(--text-muted);
  margin: 0 0 28px;
}

/* ---------- App grid / cards ---------- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.app-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  text-decoration: none;
}

.app-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.app-card h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text);
}

.app-card .app-tag {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.app-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.app-card .app-card-cta {
  margin-top: auto;
  color: var(--brand);
  font-weight: 700;
}

/* ---------- App detail ---------- */
.app-hero {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: center;
  padding: 48px 0 24px;
}

.app-hero .app-icon-lg {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.app-hero h1 {
  margin: 0 0 6px;
  font-size: 2rem;
}

.app-hero .app-tag {
  color: var(--text-muted);
  margin: 0 0 16px;
}

.screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.screenshot {
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 12px;
}

.screenshots img.screenshot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  padding: 0;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.feature-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-muted);
}

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

.values-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.values-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.values-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.donate-callout p:last-child {
  margin-bottom: 0;
}

.donate-callout .btn[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.85;
  cursor: default;
}

/* ---------- Google Play badge ---------- */
.play-badge {
  display: inline-block;
}

.play-badge img {
  height: 60px;
  width: auto;
}

/* ---------- Content / legal pages ---------- */
.content {
  padding: 40px 0 64px;
  max-width: 800px;
}

.content h1 {
  font-size: 2rem;
  margin: 0 0 8px;
}

.content h2 {
  font-size: 1.3rem;
  margin: 32px 0 8px;
}

.content p,
.content li {
  color: var(--text-muted);
}

.content .muted {
  font-size: 0.9rem;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 20px 0;
}

.placeholder {
  display: inline-block;
  background: rgba(255, 215, 0, 0.12);
  border: 1px dashed rgba(255, 215, 0, 0.5);
  color: #ffe48a;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 0.9em;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 40px 0 32px;
  margin-top: 40px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--text-muted);
  font-weight: 600;
}

.footer-bottom {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-top: 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    right: 20px;
    left: 20px;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .app-hero {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}
