/* ==========================================================================
   Synvera Creations — Our Apps & Creations
   Signature Accent: Midnight Royal Blue (#082B70)
   Architectural, Disciplined, Minimalist Instrument Aesthetic
   ========================================================================== */

/* --------------------------------------------------------------------------
   01. CURSOR VISIBILITY ENFORCEMENT
   Ensure native cursor is 100% visible across the entire page
   -------------------------------------------------------------------------- */
html,
body.apps-page,
.apps-page * {
  cursor: auto !important;
}

.apps-page a,
.apps-page button,
.apps-page [role="button"],
.apps-page [role="tab"],
.apps-page input,
.apps-page .apps-filter-btn,
.apps-page .btn-primary,
.apps-page .btn-secondary,
.apps-page .theme-toggle,
.apps-page .nav-toggle {
  cursor: pointer !important;
}

/* --------------------------------------------------------------------------
   02. DESIGN SYSTEM TOKENS & UNIFIED COLOR PALETTE
   -------------------------------------------------------------------------- */
:root,
[data-theme="light"] {
  --bg: #EAE9E3;
  --bg-subtle: #E1DFD6;
  --bg-card: #FFFFFF;
  --bg-input: #EFEFEA;

  --ink: #111215;
  --ink-secondary: #4A4D56;
  --muted: #757984;

  --line: rgba(17, 18, 21, 0.10);
  --line-strong: rgba(8, 43, 112, 0.25);

  /* Unified Brand Signature: Midnight Royal Blue */
  --royal: #082B70;
  --royal-hover: #0C3888;
  --royal-tint: rgba(8, 43, 112, 0.05);
  --royal-tint-hover: rgba(8, 43, 112, 0.10);

  --header-bg: rgba(234, 233, 227, 0.92);
  --card-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 14px 32px rgba(8, 43, 112, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
  --bg: #090B0F;
  --bg-subtle: #11141B;
  --bg-card: #0F131C;
  --bg-input: #151923;

  --ink: #EDEDED;
  --ink-secondary: #9BA1B0;
  --muted: #6B7280;

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);

  /* Unified Brand Signature: Midnight Royal Blue */
  --royal: #082B70;
  --royal-hover: #1646A8;
  --royal-tint: rgba(8, 43, 112, 0.25);
  --royal-tint-hover: rgba(8, 43, 112, 0.40);

  --header-bg: rgba(9, 11, 15, 0.90);
  --card-shadow: 0 12px 30px rgba(0, 0, 0, 0.50);
  --card-shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.14);
}

/* Base Canvas */
.apps-page {
  background: var(--bg);
  color: var(--ink);
  transition: background 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

/* Site Header */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav a.active {
  color: var(--ink);
  opacity: 1;
  position: relative;
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--royal);
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   03. HERO SECTION (ARCHITECTURAL & RESTRAINED)
   -------------------------------------------------------------------------- */
.apps-hero {
  position: relative;
  padding: 130px 0 24px;
}

.apps-hero__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--muted);
}

.royal-tag {
  color: var(--royal);
  font-weight: 700;
}

[data-theme="dark"] .royal-tag {
  color: #7DA6FF;
}

.apps-hero__headline {
  font-size: clamp(38px, 5.8vw, 70px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 0 0 18px 0;
  max-width: 900px;
}

.apps-hero__headline em {
  font-style: italic;
  font-weight: 400;
  color: var(--royal);
}

[data-theme="dark"] .apps-hero__headline em {
  color: #8EB4FF;
}

.apps-hero__lead {
  font-size: clamp(15px, 1.6vw, 17.5px);
  line-height: 1.65;
  color: var(--ink-secondary);
  max-width: 680px;
  margin: 0;
}

/* --------------------------------------------------------------------------
   04. FILTER & SEARCH BAR
   -------------------------------------------------------------------------- */
.apps-directory-section {
  padding: 32px 0 80px;
}

.apps-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 auto 32px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.apps-filter-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.apps-filter-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  font: 600 12px/1 'IBM Plex Mono', monospace;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
  user-select: none;
}

.apps-filter-btn:hover {
  color: var(--ink);
  background: var(--royal-tint);
}

.apps-filter-btn.active {
  color: #FFFFFF;
  background: var(--royal);
  font-weight: 700;
}

[data-theme="dark"] .apps-filter-btn.active {
  background: #18429C;
}

.apps-search-wrap {
  position: relative;
  min-width: 240px;
}

.apps-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid transparent;
  color: var(--ink);
  padding: 8px 12px 8px 32px;
  font: 400 13px/1.3 'Manrope', sans-serif;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}

.apps-search-input:focus {
  border-color: var(--royal);
  background: var(--bg-card);
}

.apps-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   05. ARCHITECTURAL PRODUCT CARDS GRID
   -------------------------------------------------------------------------- */
.apps-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s ease,
              border-color 0.25s ease;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--card-shadow-hover);
}

.app-card.hidden {
  display: none !important;
}

/* Card Header: Icon + Titles + Status */
.app-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

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

.app-card__icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.app-card__icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-card__category {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 3px;
}

.app-card__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}

.app-card__status {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--bg-subtle);
  white-space: nowrap;
}

/* Exactly 2 lines clamped description */
.app-card__desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-secondary);
  margin: 0 0 16px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 3.1em;
}

/* Micro Platform Specs */
.app-card__meta-line {
  font-size: 11px;
  color: var(--muted);
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.04em;
}

/* Action Buttons */
.app-card__actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
  align-items: center;
}

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

/* Primary Button: Midnight Royal Blue */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  background: var(--royal);
  color: #FFFFFF !important;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  border: 0;
}

[data-theme="dark"] .btn-primary {
  background: #123A8C;
}

.btn-primary:hover {
  background: var(--royal-hover);
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-primary:hover {
  background: #184BB0;
}

.arrow-icon {
  font-size: 14px;
  line-height: 1;
}

/* Secondary Button: Outlined Coming Soon with Static Clock Icon */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  font-size: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--royal);
  white-space: nowrap;
  user-select: none;
  transition: all 0.2s ease;
}

[data-theme="dark"] .btn-secondary {
  color: #A0BEFF;
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-secondary .clock-icon {
  color: currentColor;
  flex-shrink: 0;
}

.btn-secondary:hover {
  background: var(--royal-tint);
  border-color: var(--royal);
}

[data-theme="dark"] .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #A0BEFF;
}

.btn-secondary--full {
  width: 100%;
  padding: 12px 16px;
  font-size: 12.5px;
  font-weight: 600;
}

/* No Search Results */
.apps-no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 14px;
  display: none;
}

/* --------------------------------------------------------------------------
   06. ARCHITECTURAL PILLARS (COMPACT STRIP)
   -------------------------------------------------------------------------- */
.apps-pillars-strip {
  padding: 56px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-subtle);
}

.apps-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.pillar-item h4 {
  margin: 0 0 8px 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.pillar-item p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-secondary);
}

/* --------------------------------------------------------------------------
   07. CLOSING SECTION & STUDIO NAVIGATION
   -------------------------------------------------------------------------- */
.apps-closing {
  padding: 80px 0 56px;
}

.apps-closing__quote {
  font-size: clamp(22px, 3.4vw, 38px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 48px 0;
  max-width: 800px;
}

.apps-closing__nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 64px;
}

.apps-nav-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg-card);
  transition: all 0.2s ease;
  font-size: 11.5px;
  font-weight: 600;
}

.apps-nav-link:hover {
  border-color: var(--royal);
  background: var(--royal-tint);
}

.horizon__footer {
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.horizon__footer p {
  margin: 5px 0;
}

/* --------------------------------------------------------------------------
   08. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .apps-hero {
    padding: 110px 0 20px;
  }

  .apps-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .apps-search-wrap {
    width: 100%;
  }

  .apps-cards-grid {
    grid-template-columns: 1fr;
  }

  .app-card {
    padding: 22px;
  }

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