/* ==========================================================================
   DevTo Landing Page Stylesheet
   Modern, Dark OLED, Glassmorphic & Developer-Centric
   ========================================================================== */

:root {
  --bg-color: #08090d;
  --bg-surface: #10121a;
  --bg-surface-elevated: #161924;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.18);
  
  --primary: #3b49df;
  --primary-light: #6366f1;
  --primary-gradient: linear-gradient(135deg, #3b49df 0%, #7135f0 50%, #ec4899 100%);
  --accent-cyan: #06b6d4;
  
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 50px -10px rgba(99, 102, 241, 0.25);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background Ambient Orbs */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(140px);
  z-index: 0;
  opacity: 0.45;
}

.glow-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  left: 15%;
  background: radial-gradient(circle, #3b49df 0%, rgba(99, 102, 241, 0) 70%);
}

.glow-2 {
  width: 450px;
  height: 450px;
  top: 300px;
  right: 5%;
  background: radial-gradient(circle, #7135f0 0%, rgba(113, 53, 240, 0) 70%);
}

.glow-3 {
  width: 600px;
  height: 600px;
  bottom: 200px;
  left: 10%;
  background: radial-gradient(circle, #ec4899 0%, rgba(236, 72, 153, 0) 70%);
  opacity: 0.2;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Navigation */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 9, 13, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-main);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
}

.btn-primary {
  background: var(--text-primary);
  color: #08090d;
}

.btn-primary:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

/* Apple Store Button */
.btn-store {
  background: #ffffff;
  color: #000000;
  padding: 12px 24px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.btn-store:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.15);
  background: #f8fafc;
}

.apple-store-badge-icon {
  flex-shrink: 0;
  width: 22px;
  height: 28px;
}

.apple-logo-icon {
  flex-shrink: 0;
  width: 13px;
  height: 17px;
}

.store-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.store-subtitle {
  font-size: 0.72rem;
  font-weight: 500;
  color: #475569;
  letter-spacing: -0.01em;
}

.store-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

/* Hero Section */
.hero-section {
  padding: 70px 0 90px;
  position: relative;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: #a5b4fc;
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-lbl {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border-subtle);
}

/* Phone Mockup & Tabs */
.hero-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.preview-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  padding: 4px;
  border-radius: var(--radius-pill);
  gap: 4px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.preview-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.preview-tab.active {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.phone-frame-wrapper {
  position: relative;
  perspective: 1000px;
}

.phone-glow {
  position: absolute;
  inset: -15px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(30px);
  z-index: 0;
}

.phone-frame {
  position: relative;
  z-index: 1;
  width: 290px;
  height: 590px;
  background: #111319;
  border-radius: 46px;
  padding: 10px;
  box-shadow: 
    0 0 0 2px rgba(255, 255, 255, 0.15),
    0 0 0 5px #1e222d,
    0 30px 70px -15px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
}

.phone-island {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 75px;
  height: 20px;
  background: #000000;
  border-radius: 12px;
  z-index: 10;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: #000;
  position: relative;
}

.mockup-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.phone-chin-bar {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  z-index: 10;
}

/* Sections Common */
.section {
  padding: 90px 0;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 60px;
}

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-light);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

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

.feature-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--border-highlight);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.feature-icon-box {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(236, 72, 153, 0.15) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a5b4fc;
  margin-bottom: 22px;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Screenshots Showcase */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.showcase-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  overflow: hidden;
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
}

.showcase-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
}

.showcase-img-wrap {
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 1206 / 2622;
}

.showcase-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.showcase-info {
  padding: 16px 8px 4px;
}

.showcase-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.showcase-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* CTA Card */
.cta-section {
  padding-bottom: 100px;
}

.cta-card {
  position: relative;
  background: linear-gradient(180deg, rgba(22, 25, 36, 0.8) 0%, rgba(13, 15, 22, 0.95) 100%);
  border: 1px solid var(--border-highlight);
  border-radius: 32px;
  padding: 64px 32px;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.8);
}

.cta-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.cta-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 24px;
}

.cta-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.cta-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 32px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0;
  background: #050608;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
}

.footer-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

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

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

.footer-copy a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.footer-links-group {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links-group a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .phone-frame {
    width: 260px;
    height: 530px;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

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

  .nav-links .nav-link {
    display: none;
  }

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