/* =========================================================
   ElevenSeventeen Systems — Main Stylesheet
   ========================================================= */

/* --- CSS Variables / Design Tokens --- */
:root {
  /* Colors */
  --bg-base:      #0c0e16;
  --bg-surface:   #141824;
  --bg-raised:    #1c2132;
  --border:       #252a3a;
  --border-light: #2e3449;

  --accent:       #4f8ef7;
  --accent-hover: #6ba3ff;
  --accent-glow:  rgba(79, 142, 247, 0.18);

  --purple:       #8b6ef5;
  --purple-glow:  rgba(139, 110, 245, 0.18);

  --text-primary: #e2e8f4;
  --text-muted:   #8896b0;
  --text-faint:   #4a5568;

  --success:      #34d399;
  --warning:      #fbbf24;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
               system-ui, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", monospace;

  /* Spacing & Layout */
  --max-width: 1100px;
  --nav-height: 64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.45);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(79, 142, 247, 0.12);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

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

ul, ol {
  list-style: none;
}

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

/* --- Typography --- */
h1, h2, h3, h4, h5 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { max-width: 65ch; }

.text-muted  { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.text-center p { margin-left: auto; margin-right: auto; }

.label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(12, 14, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  color: var(--text-primary);
  white-space: nowrap;
  line-height: 1;
}

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

.nav__logo-name {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.nav__logo-sub {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}

.nav__logo-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  font-family: var(--font-mono);
}

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

.nav__links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.nav__links a:hover {
  color: var(--text-primary);
  background: var(--bg-raised);
}

.nav__links a.active {
  color: var(--accent);
}

.nav__cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 7px 16px !important;
}

.nav__cta:hover {
  background: var(--accent-hover) !important;
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px rgba(79, 142, 247, 0.3);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(79, 142, 247, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: var(--bg-raised);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-glow);
  color: var(--accent-hover);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* App Store badge button */
.btn-appstore {
  background: var(--bg-raised);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  padding: 10px 20px;
}

.btn-appstore:hover {
  color: var(--text-primary);
  background: var(--border);
  border-color: var(--text-faint);
}

.btn-appstore svg {
  width: 18px;
  height: 18px;
  fill: var(--text-primary);
}

/* --- Hero --- */
.hero {
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(79, 142, 247, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-glow);
  border: 1px solid rgba(79, 142, 247, 0.25);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.04em;
}

.hero__title {
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 54ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* --- Section Headers --- */
.section-header {
  margin-bottom: 48px;
}

.section-header h2 {
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* --- App Cards --- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.app-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.app-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.app-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.app-card__icon--green {
  background: linear-gradient(135deg, #34d399, #059669);
}

.app-card__icon--orange {
  background: linear-gradient(135deg, #fb923c, #dc2626);
}

.app-card__icon--dsk {
  background: linear-gradient(145deg, #2176c8, #1458a8);
}

.app-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-card__name {
  font-size: 1.2rem;
  font-weight: 700;
}

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

.app-card__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--bg-raised);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge--live {
  color: var(--success);
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.25);
}

.badge--beta {
  color: var(--warning);
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.25);
}

.badge--dot::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.app-card__desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  flex: 1;
}

.app-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}

/* --- Feature List --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color 0.2s;
}

.feature-item:hover {
  border-color: var(--border-light);
}

.feature-item__icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.feature-item__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-item__desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- App Detail Pages --- */
.app-hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
}

.app-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.app-hero__icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
}

.app-hero__title {
  margin-bottom: 8px;
}

.app-hero__tagline {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.app-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.app-hero__screenshot-area {
  position: relative;
}

.screenshot-placeholder {
  background: var(--bg-surface);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  aspect-ratio: 9/16;
  max-width: 260px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-faint);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
}

.screenshot-placeholder .ph-icon {
  font-size: 2rem;
  opacity: 0.4;
}

/* Screenshots row */
.screenshots-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.screenshots-row::-webkit-scrollbar {
  height: 4px;
}

.screenshots-row::-webkit-scrollbar-track {
  background: transparent;
}

.screenshots-row::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.screenshot-frame {
  flex-shrink: 0;
  width: 200px;
  aspect-ratio: 9/19.5;
  background: var(--bg-surface);
  border: 2px dashed var(--border-light);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 0.78rem;
  text-align: center;
  padding: 12px;
}

/* --- App Features Section --- */
.app-features {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

/* --- Info Boxes --- */
.info-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
}

.info-box--warning {
  border-left-color: var(--warning);
}

.info-box--success {
  border-left-color: var(--success);
}

.info-box p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* --- Privacy / Legal Pages --- */
.legal-content {
  padding: 60px 0 80px;
}

.legal-content__inner {
  max-width: 760px;
}

.legal-content h2 {
  font-size: 1.3rem;
  margin-top: 40px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content p {
  color: var(--text-muted);
  margin-bottom: 12px;
  max-width: none;
}

.legal-content ul {
  list-style: disc;
  padding-left: 1.5em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.legal-content ul li {
  margin-bottom: 6px;
}

.legal-content a {
  color: var(--accent);
}

/* --- Support / Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.contact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.contact-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.contact-card__desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item__q {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.faq-item__a {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: none;
}

/* --- Page Header (inner pages) --- */
.page-header {
  padding: 60px 0 48px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

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

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

.breadcrumb__sep {
  color: var(--text-faint);
}

/* --- Divider --- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: auto;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__brand-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.footer__brand-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 30ch;
}

.footer__col-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.83rem;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 12px;
}

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

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

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px;
    gap: 4px;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__toggle {
    display: flex;
  }

  .section {
    padding: 56px 0;
  }

  .hero {
    padding: 64px 0 56px;
  }

  .app-hero__inner {
    grid-template-columns: 1fr;
  }

  .app-hero__screenshot-area {
    display: none;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .footer__inner {
    grid-template-columns: 1fr;
  }

  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
