/* Modern CSS Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Geist Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code, pre, .mono {
  font-family: 'Geist Mono', ui-monospace, 'SF Mono', monospace;
}

/* Light theme */
body.light {
  --bg: #fafbfc;
  --text: #24292f;
  --text-muted: #57606a;
  --bg-nav: #ffffff;
  --nav-border: #e1e4e8;
  --highlight: #0969da;
  --highlight-bg: #ddf4ff;
  --hover-bg: #f3f4f6;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  background: var(--bg);
  color: var(--text);
}

/* Dark theme */
body.dark {
  --bg: #0d1117;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --bg-nav: #161b22;
  --nav-border: #30363d;
  --highlight: #58a6ff;
  --highlight-bg: rgba(56, 139, 253, 0.15);
  --hover-bg: #21262d;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  background: var(--bg);
  color: var(--text);
}

/* Top Navigation Bar */
#nav-placeholder {
  width: 100%;
  flex-shrink: 0;
}

.menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: auto;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--nav-border);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  z-index: 1000;
}

.menu-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  width: 100%;
  max-width: 1000px;
}

.nav-logo {
  display: flex;
  align-items: center;
}

/* Brand / Logo Area */
.menu .brand {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  gap: 0.75rem;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text .tagline {
  font-size: 0.65rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: lowercase;
  margin-top: 0.1rem;
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--hover-bg);
  border: 1px solid var(--nav-border);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  background: var(--highlight-bg);
  border-color: var(--highlight);
  transform: scale(1.05);
}

/* Navigation Links */
.menu .nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.menu .nav li {
  margin: 0;
}

.menu .nav a {
  text-decoration: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.menu .nav a:hover {
  background: var(--hover-bg);
  color: var(--text);
}

.menu .nav a.active {
  background: var(--highlight-bg);
  color: var(--highlight);
  font-weight: 600;
}

/* Main Content Area */
main {
  flex: 1;
  padding: 2.5rem 3rem;
  padding-top: 5rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

@media (min-width: 1200px) {
  main {
    margin-left: calc((100% - 1000px) / 2);
    margin-right: auto;
  }
}

main h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.25rem 0;
  color: var(--text);
}

main p {
  color: var(--text-muted);
  margin: 0 0 1.25rem 0;
  font-size: 1.05rem;
}

main p:last-child {
  margin-bottom: 0;
}

/* Page Header with Logo */
.page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.page-logo {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
}

.page-header h1 {
  margin: 0;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.hero-logo {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  object-fit: cover;
}

.hero-brand h1 {
  margin-bottom: 0.25rem;
}

.tagline-main {
  font-size: 1rem;
  color: var(--highlight);
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  margin: 0 0 1.5rem 0;
}

@media (max-width: 768px) {
  .hero-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
  }
}

/* Download Section */
.download-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--nav-border);
  text-align: center;
}

.app-store-link {
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-store-link:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.app-store-badge {
  height: 50px;
  width: auto;
}

.subtitle {
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
}

/* Tiles Section */
.tiles-section {
  margin-top: 2rem;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 1.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::before {
  content: '>';
  font-family: 'Geist Mono', monospace;
  color: var(--highlight);
}

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

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

.tile {
  background: var(--bg-nav);
  border: 1px solid var(--nav-border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  display: block;
}

.tile:hover {
  border-color: var(--highlight);
  background: var(--hover-bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tile h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text);
  letter-spacing: -0.02em;
}

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

.tile:hover h3 {
  color: var(--highlight);
}

/* Privacy Policy Page */
.privacy-page {
  max-width: 1000px;
}

.privacy-page h1 {
  margin-bottom: 0.5rem;
}

.last-updated {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-style: italic;
}

.policy-section {
  margin-bottom: 2rem;
}

.policy-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.75rem 0;
  letter-spacing: -0.02em;
}

.policy-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.25rem 0 0.5rem 0;
}

.policy-section p {
  margin-bottom: 0.75rem;
}

.policy-section ul {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.policy-section li {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.policy-section strong {
  color: var(--text);
}

.policy-section a {
  color: var(--highlight);
  text-decoration: none;
}

.policy-section a:hover {
  text-decoration: underline;
}

/* Contact Page */
.contact-info {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.contact-item {
  background: var(--bg-nav);
  border: 1px solid var(--nav-border);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  flex: 1;
  max-width: 280px;
}

.contact-item h3 {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-item a {
  color: var(--highlight);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
}

.contact-item a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .contact-info {
    flex-direction: column;
    gap: 1rem;
  }

  .contact-item {
    max-width: none;
  }
}

.tile-large {
  padding: 2rem;
}

.tile-large p {
  margin-bottom: 1rem;
}

.tile-large p:last-child {
  margin-bottom: 0;
}

/* Footer in Nav - hidden for top nav */
.nav-footer {
  display: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .menu {
    padding: 0 1rem;
    flex-wrap: wrap;
  }

  .menu .brand {
    width: 100%;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--nav-border);
  }

  .menu .nav {
    width: 100%;
    justify-content: center;
    padding: 0.5rem 0;
    gap: 0.5rem;
  }

  .menu .nav a {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }

  main {
    padding: 1.5rem;
    padding-top: 7rem;
  }

  main h1 {
    font-size: 1.75rem;
  }

  .tiles-grid,
  .tiles-grid.two-col {
    grid-template-columns: 1fr;
  }

  .tile {
    padding: 1.25rem;
  }

  .tile-large {
    padding: 1.5rem;
  }
}

/* Smooth scrollbar for webkit browsers */
.menu::-webkit-scrollbar {
  width: 6px;
}

.menu::-webkit-scrollbar-track {
  background: transparent;
}

.menu::-webkit-scrollbar-thumb {
  background: var(--nav-border);
  border-radius: 3px;
}

.menu::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
