/* === Custom Properties === */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --border-color: rgba(0, 0, 0, 0.08);
  --card-bg: #ffffff;
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --nav-bg: rgba(255, 255, 255, 0.72);
  --accent-gradient: linear-gradient(135deg, #ff8d28, #cb30e0, #00c0e8, #5ac8fa);
  --accent-color: #0088ff;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #000000;
    --bg-secondary: #1d1d1f;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: #1d1d1f;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.5);
    --nav-bg: rgba(0, 0, 0, 0.72);
    --accent-gradient: linear-gradient(135deg, #ff9230, #db34f2, #3cd3fe, #64d2ff);
    --accent-color: #0091FF;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-stack);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* === Navigation === */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-color);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  margin: 4px 0;
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* === Mobile Nav === */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
  }

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

  .nav-links li {
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 12px 24px;
    font-size: 1rem;
  }
}

/* === Sections === */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 48px;
  text-align: center;
}

/* === Hero === */
.hero {
  text-align: center;
  padding: 120px 24px 80px;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.5;
}

/* === Apps Grid === */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

@media (max-width: 768px) {
  .apps-grid {
    grid-template-columns: 1fr;
  }
}

/* === App Card === */
.app-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 36px 32px 32px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.app-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  margin-bottom: 20px;
  overflow: hidden;
  flex-shrink: 0;
}

.app-icon img {
  width: 100%;
  height: 100%;
}

.app-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.app-tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.app-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 20px;
  flex-grow: 1;
}

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

.app-badges a {
  display: block;
  height: 52px;
  transition: opacity 0.2s;
}

.app-badges a:hover {
  opacity: 0.8;
}

.app-badges img {
  height: 52px;
  width: auto;
}

/* === About === */
.about-text {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  text-align: center;
}

/* === Contact === */
.contact-wrapper {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.contact-btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 980px;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: opacity 0.2s, transform 0.2s;
}

.contact-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* === Footer === */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  list-style: none;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

.footer-copy {
  margin-top: 8px;
}

/* === Scroll Animations === */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Legal Pages === */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.legal h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}

.legal h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 12px;
}

.legal p,
.legal ul {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.legal ul {
  padding-left: 24px;
}

/* === Utility === */
.bg-secondary {
  background: var(--bg-secondary);
}
