/* ============================================
   Papaia Labs — Landing Page Styles
   ============================================ */

/* --- Custom Properties --- */
:root {
  --color-base: #0a0a0a;
  --color-surface: #141414;
  --color-surface-elevated: #1e1e1e;
  --color-accent: #FF5500;
  --color-accent-hover: #FF7733;
  --color-accent-subtle: rgba(255, 85, 0, 0.1);
  --color-mint: #00E5A0;
  --color-mint-subtle: rgba(0, 229, 160, 0.08);
  --color-text-primary: #F5F5F5;
  --color-text-secondary: #999999;
  --color-text-tertiary: #666666;
  --color-border: rgba(255, 255, 255, 0.1);
  --color-blue: #2F80ED;
  --color-orange-logo: #FF8A00;

  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 10rem;

  --max-width: 1200px;
  --radius: 16px;
  --radius-sm: 10px;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--color-base);
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Grain Texture Overlay --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Typography Scale --- */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  color: var(--color-text-primary);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--color-text-primary);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  max-width: 52ch;
}

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

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

section {
  padding: var(--space-2xl) 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-sm) 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(15, 15, 15, 0.8);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s ease;
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-logo svg {
  width: 72px;
  height: auto;
}

.nav-wordmark {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  padding-bottom: var(--space-2xl);
}

.hero-content {
  max-width: 900px;
}

.hero h1 {
  margin-bottom: var(--space-md);
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--color-accent), var(--color-mint));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-dot {
  color: var(--color-mint);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.35rem);
  line-height: 1.65;
  color: var(--color-text-secondary);
  max-width: 580px;
  margin-bottom: var(--space-xl);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-base);
  background: var(--color-accent);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(255, 85, 0, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}

.btn-primary:hover svg {
  transform: translateX(3px);
}

/* --- Features Section --- */
.features {
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.features-header {
  margin-bottom: var(--space-xl);
  max-width: 600px;
}

.features-header p {
  margin-top: var(--space-sm);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-mint));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.feature-card:hover {
  border-color: rgba(255, 85, 0, 0.2);
  background: var(--color-surface-elevated);
  transform: translateY(-4px);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
  color: var(--color-accent);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-icon--mint {
  background: var(--color-mint-subtle);
  color: var(--color-mint);
}

.feature-card--mint:hover {
  border-color: rgba(0, 229, 160, 0.2);
}

.feature-card--mint::before {
  background: linear-gradient(90deg, var(--color-mint), var(--color-accent));
}

.feature-card h3 {
  color: var(--color-text-primary);
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* --- Footer / CTA Section --- */
.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border);
}

.footer-cta {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.footer-cta h2 {
  margin-bottom: var(--space-sm);
}

.footer-cta p {
  margin: 0 auto var(--space-lg);
  text-align: center;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.footer-copyright {
  font-size: 0.875rem;
  color: var(--color-text-tertiary);
}

.footer-links {
  display: flex;
  gap: var(--space-md);
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--color-text-tertiary);
  transition: color 0.25s ease;
}

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

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --space-2xl: 4rem;
    --space-3xl: 6rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .hero {
    min-height: auto;
    padding-top: 8rem;
    padding-bottom: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .feature-card {
    padding: var(--space-md);
  }
}

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

  h1 {
    font-size: 2.5rem;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

/* --- Focus styles --- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* --- Selection --- */
::selection {
  background: rgba(255, 85, 0, 0.3);
  color: var(--color-text-primary);
}
