/* SarahUniverse — 2026 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

:root {
  --bg: #07080e;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.07);
  --border-glow: rgba(139, 92, 246, 0.3);
  --purple: #7c3aed;
  --purple-light: #a78bfa;
  --cosmic-blue: #38bdf8;
  --text: #e2e8f0;
  --text-muted: #94a3b8;

  /* 4.9:1 against --bg, which clears WCAG AA for body text. The previous
     #475569 was 2.6:1 and genuinely failed; it is the only token in the
     palette that did. */
  --text-dim: #707f96;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* === BACKGROUND ORBS === */

body::before {
  content: '';
  position: fixed;
  top: -15%;
  left: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(192, 64, 160, 0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* === STARS (very subtle) === */
.stars, .stars2, .stars3 {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
  z-index: 0;
  background: transparent;
  pointer-events: none;
}

.stars {
  background: transparent url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="1.5" fill="white" /><circle cx="50" cy="30" r="1" fill="white"/><circle cx="80" cy="80" r="1.5" fill="white"/></svg>') repeat;
  animation: moveStars 100s linear infinite;
  opacity: 0.12;
}

.stars2 {
  background: transparent url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="20" cy="20" r="1" fill="white" /><circle cx="60" cy="60" r="1" fill="white"/></svg>') repeat;
  animation: moveStars 150s linear infinite;
  opacity: 0.07;
}

.stars3 {
  background: transparent url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="40" r="1.2" fill="white" /></svg>') repeat;
  animation: moveStars 200s linear infinite;
  opacity: 0.05;
}

@keyframes moveStars {
  from { transform: translateY(0); }
  to { transform: translateY(-1000px); }
}

body > *:not(.stars):not(.stars2):not(.stars3) {
  position: relative;
  z-index: 1;
}

/* === REDUCED MOTION === */

/* Honors the user's system setting, which WCAG 2.3.3 asks for.
   The star layers exist only to drift; with motion off they are decoration
   with no remaining purpose, so they are removed rather than frozen mid-scroll.
   Removing them also lets the accessibility checker resolve text backgrounds:
   axe cannot see through the tiled star overlay and otherwise reports every
   element on the page as a contrast failure. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .stars,
  .stars2,
  .stars3 {
    display: none;
  }
}

/* === BASE ELEMENTS === */

/* These sit above the component rules so that every more specific selector
   below them appears later in the file as well as winning on specificity. */
a {
  color: var(--purple-light);
  text-decoration: none;
}

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

/* === NAVBAR === */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(7, 8, 14, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  box-sizing: border-box;
  z-index: 10;
}

.nav-container {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  overflow: visible;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo {
  height: 48px;
  width: auto;
}

.brand-name {
  display: none;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  gap: 4px;
}

.nav-links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
  display: inline-block;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--purple-light);
  background: rgba(255, 255, 255, 0.07);
}

/* === HEADER === */
.header {
  text-align: center;
  padding: 16px 20px 14px;
  background: linear-gradient(160deg, #0f0520 0%, #1e0a45 35%, #3a1575 65%, #6a209a 85%, #b03898 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(167, 139, 250, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.header-logo {
  height: auto;
  width: clamp(260px, 45vw, 520px);
  max-width: 100%;
  margin-bottom: 0;
  position: relative;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.tagline {
  font-family: 'Inter', sans-serif;
  font-size: 1.6rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.08em;
  margin-top: 4px;
  margin-bottom: 0;
}

/* === MAIN CONTENT === */
.content {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px;
}

section {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: 16px;
  margin-bottom: 12px;
  transition: border-color 0.25s ease, background 0.25s ease;
}

section:hover {
  background: var(--surface-hover);
  border-color: var(--border-glow);
}

h2 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--purple-light);
  margin-top: 0;
  margin-bottom: 20px;
  border: none;
  padding: 0;
}

ul {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

ul li {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  display: flex;
  gap: 12px;
}

ul li strong {
  color: var(--text);
  font-weight: 500;
  min-width: 130px;
  flex-shrink: 0;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  padding-top: 2px;
}

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

/* === NAVBAR ACTIVE LINK === */
.nav-links a.active {
  color: var(--purple-light);
  background: rgba(255, 255, 255, 0.07);
}

/* === APP CARDS === */
.apps-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-card {
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 26px;
  margin-bottom: 12px;
  display: flex;
  gap: 22px;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.app-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.app-card:hover::before {
  opacity: 1;
}

.app-icon-wrap {
  flex-shrink: 0;
  border-radius: 22%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover .app-icon-wrap {
  transform: scale(1.05);
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.7), 0 0 18px rgba(124, 58, 237, 0.5);
}

.app-icon-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--purple), #b03898);
}

.app-icon-wrap img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
}

.app-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.app-name {
  color: var(--purple-light);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0;
  padding: 0;
  border: none;
}

.app-description {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.9rem;
}

.app-card-pills {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-card-pills li {
  display: inline-flex;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--text-muted);
  line-height: 1.3;
}

.app-card-thumb {
  flex-shrink: 0;
  width: 84px;
  height: auto;
  align-self: center;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.app-card:hover .app-card-thumb {
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(167, 139, 250, 0.25);
}

.app-card-chevron {
  flex-shrink: 0;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.app-card:hover .app-card-chevron {
  color: var(--purple-light);
  transform: translateX(3px);
}

.app-store-badge img {
  height: 36px;
  width: auto;
  margin-top: 4px;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}

.app-store-badge:hover img {
  opacity: 1;
}

/* === APP PAGE HEADER ICON === */
.app-header-icon {
  width: 96px;
  height: 96px;
  border-radius: 22%;
  object-fit: cover;
  margin-bottom: 8px;
}

/* === PRIVACY POLICY === */
.policy-updated {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}

.policy-block {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.policy-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.policy-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text);
  margin: 0 0 12px 0;
}

.policy-block p + p {
  margin-top: 12px;
}

.policy-list {
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
  padding-left: 4px;
}

.policy-list li {
  display: flex;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  align-items: baseline;
}

.policy-list li::before {
  content: '–';
  color: var(--purple-light);
  flex-shrink: 0;
}

.policy-list li strong {
  color: var(--text);
  font-weight: 500;
  font-family: inherit;
  font-size: inherit;
  min-width: unset;
}

.policy-contact {
  margin-top: 12px;
  line-height: 1.9;
}

/* === SCREENSHOT CAROUSEL === */
.carousel-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 0 40px;
  position: relative;
}

.carousel-wrap::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(900px, 90%);
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(167, 139, 250, 0.18) 0%, rgba(124, 58, 237, 0.08) 40%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1100px;
  padding: 0 56px;
  z-index: 1;
}

.app-about-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.app-about-text p + p {
  margin-top: 12px;
}

.app-about-icon {
  width: 76px;
  height: auto;
  flex-shrink: 0;
  display: block;
}

.app-about-icon-link {
  display: inline-block;
  flex-shrink: 0;
  border-radius: 22%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-about-icon-link:hover {
  transform: scale(1.05);
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.7), 0 0 18px rgba(124, 58, 237, 0.5);
}

.carousel-track-wrap {
  flex: 1;
  overflow: hidden;
  width: 100%;
  padding: 30px 0;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.08) 4%,
    rgba(0, 0, 0, 0.3) 10%,
    rgba(0, 0, 0, 0.65) 16%,
    rgba(0, 0, 0, 0.9) 22%,
    black 28%,
    black 72%,
    rgba(0, 0, 0, 0.9) 78%,
    rgba(0, 0, 0, 0.65) 84%,
    rgba(0, 0, 0, 0.3) 90%,
    rgba(0, 0, 0, 0.08) 96%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.08) 4%,
    rgba(0, 0, 0, 0.3) 10%,
    rgba(0, 0, 0, 0.65) 16%,
    rgba(0, 0, 0, 0.9) 22%,
    black 28%,
    black 72%,
    rgba(0, 0, 0, 0.9) 78%,
    rgba(0, 0, 0, 0.65) 84%,
    rgba(0, 0, 0, 0.3) 90%,
    rgba(0, 0, 0, 0.08) 96%,
    transparent 100%
  );
}

.carousel-track {
  display: flex;
  align-items: center;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  gap: 24px;
}

.carousel-slide {
  flex: 0 0 auto;
  width: clamp(220px, 26vw, 320px);
  height: auto;
  display: block;
  border-radius: 28px;
  object-fit: contain;
  transform: scale(0.82);
  opacity: 0.45;
  filter: saturate(0.85);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.5s ease,
    filter 0.5s ease,
    box-shadow 0.5s ease;
}

.carousel-slide.active {
  transform: scale(1);
  opacity: 1;
  filter: saturate(1);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(167, 139, 250, 0.25),
    0 0 60px rgba(124, 58, 237, 0.35);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
  background: rgba(15, 5, 32, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.carousel-prev {
  left: 4px;
}

.carousel-next {
  right: 4px;
}

.carousel-btn:hover {
  background: rgba(124, 58, 237, 0.4);
  border-color: var(--purple-light);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.45);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.94);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, width 0.25s ease, transform 0.2s ease;
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.32);
}

.carousel-dot.active {
  background: var(--purple-light);
  width: 24px;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.6);
}


/* === SUPPORT FORM === */
.support-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.form-row input,
.form-row textarea,
.form-row select {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-row select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 8"><path fill="%23a78bfa" d="M6 8 0 0h12z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 10px;
  padding-right: 36px;
  cursor: pointer;
}

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

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--border-glow);
  background: rgba(0, 0, 0, 0.35);
}

.support-submit {
  align-self: flex-start;
  background: linear-gradient(135deg, var(--purple), #b03898);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.support-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.1) drop-shadow(0 0 10px rgba(167, 139, 250, 0.4));
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-status {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}

.form-status.success {
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
}

.form-status.error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
}

/* === GITHUB ICON === */
.github-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.github-icon-link:hover {
  transform: scale(1.2);
}

.github-icon {
  width: 22px;
  height: 22px;
  fill: var(--text-muted);
  transition: fill 0.2s;
}

.github-icon-link:hover .github-icon {
  fill: var(--purple-light);
}

/* === APP HERO === */
.app-hero {
  text-align: center;
  padding: 64px 20px 32px;
  background: linear-gradient(160deg, #0f0520 0%, #1e0a45 35%, #3a1575 65%, #6a209a 85%, #b03898 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.app-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(167, 139, 250, 0.18) 0%, transparent 60%);
  pointer-events: none;
}

.app-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-hero-icon-link {
  position: relative;
  width: 108px;
  height: 108px;
  display: inline-block;
  flex-shrink: 0;
  margin-bottom: 22px;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 24px rgba(167, 139, 250, 0.35));
}

.app-hero-icon-link:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 22px 48px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 36px rgba(167, 139, 250, 0.6));
}

.app-hero-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mask-image: var(--app-icon-mask);
  -webkit-mask-image: var(--app-icon-mask);
}

.app-hero-icon-stroke {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.app-hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 8px;
}

.app-hero-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: white;
  margin: 0 0 14px;
}

.app-hero-tagline {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 12px;
  line-height: 1.4;
}

.app-hero-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 560px;
  line-height: 1.6;
  margin: 0 0 28px;
}

.app-hero-badge {
  display: inline-block;
  transition: transform 0.2s ease, filter 0.2s ease;
}

/* stylelint-disable-next-line no-descending-specificity --
   Flagged against .app-store-badge:hover img earlier in the file. The two can
   never match the same element: .app-store-badge is not present in any page,
   and .app-hero-badge is only ever a direct child of .app-hero-inner. Moving
   this block above the app-card rules to satisfy the linter would split the
   app-hero section for no benefit. */
.app-hero-badge img {
  width: 220px;
  height: auto;
  display: block;
}

.app-hero-badge:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 20px rgba(167, 139, 250, 0.55));
}

.app-hero-stats {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.app-hero-stats li {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.7);
  font-size: inherit;
  line-height: 1.4;
}

/* === FLUSH SECTIONS (no card chrome) === */
.section-flush {
  background: transparent;
  border: none;
  padding: 48px 0 24px;
  margin-bottom: 0;
  border-radius: 0;
}

.section-flush:hover {
  background: transparent;
  border-color: transparent;
}

.section-flush > h2 {
  text-align: center;
  font-size: 0.78rem;
  margin-bottom: 28px;
}

/* Centered, narrow variant of a flush section. This was previously keyed off
   the #about id, which meant styling by id and left #features out. It is a
   class so the intent travels with the markup. It stays below .section-flush
   so it still wins on source order at equal specificity. */
.section-narrow {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

/* stylelint-disable-next-line no-descending-specificity --
   Flagged against .policy-block p + p earlier in the file. They cannot collide:
   .section-narrow is used in apps.html and tosstracker.html, .policy-block only
   in tosstracker-privacy.html. */
.section-narrow p {
  font-size: 1rem;
}

.section-narrow p + p {
  margin-top: 14px;
}

/* === FEATURE GRID === */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px 24px;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.feature-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card-wide {
  grid-column: 1 / -1;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(176, 56, 152, 0.25));
  border: 1px solid rgba(167, 139, 250, 0.25);
  margin-bottom: 14px;
}

.feature-heading {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  margin: 0 0 8px;
}

/* stylelint-disable-next-line no-descending-specificity --
   Flagged against .policy-block p + p earlier in the file. They cannot collide:
   .policy-block appears only in tosstracker-privacy.html and .feature-card only
   in tosstracker.html, and neither nests inside the other. */
.feature-card p {
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0;
}

.feature-list {
  flex-direction: column;
  gap: 8px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  flex-direction: row;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  align-items: baseline;
}

.feature-list li::before {
  content: '';
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--purple-light);
  margin-top: 8px;
  box-shadow: 0 0 6px rgba(167, 139, 250, 0.5);
}

/* === CTA BAND === */
.cta-band {
  text-align: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(176, 56, 152, 0.14));
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 20px;
  padding: 44px 32px;
  margin-top: 24px;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(167, 139, 250, 0.25) 0%, transparent 60%);
  pointer-events: none;
}

.cta-band:hover {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(176, 56, 152, 0.18));
  border-color: rgba(167, 139, 250, 0.35);
}

.cta-title {
  position: relative;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-transform: none;
  margin: 0 0 8px;
  padding: 0;
  border: none;
}

.cta-sub {
  position: relative;
  color: var(--text-muted);
  margin: 0 0 22px;
  font-size: 0.98rem;
}

.cta-band .app-hero-badge {
  position: relative;
}

/* === LINK ROW (support / privacy cards) === */
.link-row {
  background: transparent;
  border: none;
  padding: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-row:hover {
  background: transparent;
  border-color: transparent;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.link-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-glow);
  color: var(--text);
  transform: translateX(2px);
}

.link-card-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(176, 56, 152, 0.25));
  border: 1px solid rgba(167, 139, 250, 0.25);
}

.link-card-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.link-card-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.link-card-chevron {
  margin-left: auto;
  font-size: 1.4rem;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.link-card:hover .link-card-chevron {
  color: var(--purple-light);
  transform: translateX(3px);
}

/* === SUPPORT PAGE === */
.support-header {
  padding: 36px 20px 28px;
}

.support-intro {
  margin-bottom: 22px;
  font-size: 0.95rem;
}

/* === 404 === */

/* Compact header so the message lands above the fold on a lost-visitor page. */
.header-compact .header-logo {
  width: clamp(170px, 26vw, 300px);
}

.header-compact .tagline {
  font-size: 1.15rem;
}

.notfound {
  text-align: center;
  padding: clamp(40px, 9vw, 72px) clamp(20px, 5vw, 44px);
}

.notfound-code {
  font-family: 'Fira Code', monospace;
  font-size: clamp(4.5rem, 20vw, 9rem);
  font-weight: 500;
  line-height: 1;
  margin: 0;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--cosmic-blue) 55%, #b03898 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(167, 139, 250, 0.25));
}

.notfound-title {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  font-weight: 600;
  color: var(--text);
  margin: 18px 0 0;
  letter-spacing: 0.01em;
  text-transform: none;
}

.notfound-text {
  max-width: 46ch;
  margin: 12px auto 0;
}

.notfound-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.notfound-btn {
  background: linear-gradient(135deg, var(--purple), #b03898);
  color: #ffffff;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.notfound-btn:hover {
  color: #ffffff;
  transform: translateY(-1px);
  filter: brightness(1.1) drop-shadow(0 0 10px rgba(167, 139, 250, 0.4));
}

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

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

/* === FOOTER === */
footer {
  text-align: center;
  border-top: 1px solid var(--border);
  padding: 24px;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* === RESPONSIVE / MOBILE === */
@media (max-width: 640px) {
  .nav-logo {
    height: 22px;
    max-width: 140px;
  }

  /* Six links plus two icons do not fit on one row at 390px, and squeezing
     them pushed the GitHub and email links off the right edge. The row wraps
     instead: brand on top, links centered underneath. This also holds if a
     seventh item is ever added. */
  .nav-container {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 6px;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
  }

  .nav-brand {
    flex-shrink: 1;
    min-width: 0;
  }

  .navbar {
    padding: 12px 16px;
  }

  .nav-links a {
    font-size: 0.8rem;
    padding: 6px 7px;
  }


  .tagline {
    font-size: 1.1rem;
    letter-spacing: 0.04em;
  }

  /* Content & sections: reduce padding */
  .content {
    padding: 24px 16px;
  }

  section {
    padding: 20px 16px;
  }

  /* List items: stack label above value instead of side-by-side */
  ul li {
    flex-direction: column;
    gap: 3px;
  }

  ul li strong {
    min-width: unset;
  }

  /* App cards: tighten spacing, hide thumb (too tall when stacked) */
  .app-card {
    gap: 14px;
    padding: 18px 18px;
  }

  .app-card-thumb {
    display: none;
  }

  .app-card-pills {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }

  .app-card-pills li {
    padding: 3px 8px;
    flex-direction: row;
    gap: 0;
  }

  .app-card-chevron {
    font-size: 1.4rem;
  }

  /* Policy list: keep dash and text side-by-side (override global ul li stacking) */
  .carousel {
    padding: 0 12px;
  }

  .carousel-wrap {
    padding: 32px 0 24px;
  }

  .carousel-slide {
    width: clamp(200px, 64vw, 280px);
  }

  .carousel-track-wrap {
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.3) 6%,
      rgba(0, 0, 0, 0.75) 12%,
      black 20%,
      black 80%,
      rgba(0, 0, 0, 0.75) 88%,
      rgba(0, 0, 0, 0.3) 94%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.3) 6%,
      rgba(0, 0, 0, 0.75) 12%,
      black 20%,
      black 80%,
      rgba(0, 0, 0, 0.75) 88%,
      rgba(0, 0, 0, 0.3) 94%,
      transparent 100%
    );
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
  }

  .carousel-prev {
    left: -4px;
  }

  .carousel-next {
    right: -4px;
  }

  .app-about-row {
    flex-direction: row;
    align-items: flex-start;
  }

  .policy-list li {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
  }

  .policy-block {
    padding-bottom: 22px;
    margin-bottom: 22px;
  }

  /* App hero on mobile */
  .app-hero {
    padding: 40px 18px 24px;
  }

  .app-hero-icon-link {
    width: 88px;
    height: 88px;
    margin-bottom: 18px;
  }

  .app-hero-title {
    font-size: 2.2rem;
  }

  .app-hero-tagline {
    font-size: 1.05rem;
  }

  .app-hero-sub {
    font-size: 0.95rem;
    margin-bottom: 22px;
  }

  .app-hero-badge img {
    width: 200px;
  }

  .app-hero-stats {
    margin-top: 22px;
    font-size: 0.7rem;
    gap: 6px 10px;
  }

  .app-hero-stats li {
    padding: 5px 11px;
  }

  /* Flush sections */
  .section-flush {
    padding: 32px 0 16px;
  }

  /* Feature grid: stack on mobile */
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .feature-card {
    padding: 22px 20px;
  }

  /* CTA band */
  .cta-band {
    padding: 32px 22px;
  }

  .cta-title {
    font-size: 1.35rem;
  }

  /* Link cards */
  .link-card {
    padding: 14px 16px;
    gap: 14px;
  }

  .link-card-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}
