/* Saylance Website - Refined Minimal Design System */

/* ==================== CSS Variables ==================== */
:root {
  /* Colors */
  --color-primary: #1a1f3a;
  --color-accent: #3b82f6;
  --color-accent-light: #60a5fa;
  --color-text: #0a0a0a;
  --color-text-secondary: #525252;
  --color-text-tertiary: #737373;
  --color-background: #fafafa;
  --color-surface: #ffffff;
  --color-border: #e5e5e5;

  /* Typography */
  --font-display: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Layout */
  --max-width-content: 720px;
  --max-width-wide: 1200px;

  /* Effects */
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ==================== Global Styles ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

/* ==================== Typography ==================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
  line-height: 1.7;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-smooth);
}

a:hover {
  color: var(--color-accent-light);
}

strong {
  font-weight: 600;
  color: var(--color-text);
}

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

.container-wide {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ==================== Header / Navigation ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-smooth);
}

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

/* ==================== Hero Section ==================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-md);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fafafa 0%, #f0f4f8 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

.hero h1 {
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, var(--color-primary) 0%, #2d3655 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  font-weight: 400;
  line-height: 1.6;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s backwards;
}

/* ==================== Buttons ==================== */
.app-store-button {
  display: inline-block;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s backwards;
}

.app-store-button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.app-store-button img {
  height: 60px;
  width: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 1rem 2rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-smooth);
  text-decoration: none;
}

.button-primary {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(26, 31, 58, 0.25);
}

.button-primary:hover {
  background: #2d3655;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 31, 58, 0.3);
}

/* ==================== Footer ==================== */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: var(--space-3xl);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

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

.footer-contact a {
  color: var(--color-text-secondary);
  font-weight: 500;
}

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

/* ==================== Legal Pages ==================== */
.legal-page {
  padding: var(--space-3xl) 0;
  min-height: 80vh;
}

.legal-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.legal-header h1 {
  margin-bottom: var(--space-sm);
}

.legal-meta {
  font-size: 0.9375rem;
  color: var(--color-text-tertiary);
}

.legal-content {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

.legal-content h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  padding-top: var(--space-md);
}

.legal-content h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.legal-content ul, .legal-content ol {
  margin-left: var(--space-lg);
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

.legal-content li {
  margin-bottom: var(--space-xs);
  line-height: 1.7;
}

.legal-content code {
  background: #f5f5f5;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--color-primary);
}

.legal-section {
  margin-bottom: var(--space-2xl);
}

/* ==================== Animations ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(2%, -2%) rotate(1deg);
  }
  50% {
    transform: translate(-2%, 2%) rotate(-1deg);
  }
  75% {
    transform: translate(2%, 2%) rotate(0.5deg);
  }
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
  .hero {
    min-height: 100vh;
    padding: var(--space-md);
  }

  .nav-links {
    gap: var(--space-md);
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .legal-page {
    padding: var(--space-2xl) 0;
  }
}

@media (max-width: 480px) {
  :root {
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 5rem;
  }

  .app-store-button img {
    height: 50px;
  }
}

/* ==================== Print Styles ==================== */
@media print {
  .site-header,
  .site-footer {
    display: none;
  }

  .legal-page {
    padding: 0;
  }

  body {
    background: white;
  }
}
