@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --secondary: #06b6d4;
  --bg-color: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --card-bg: rgba(255, 255, 255, 0.7);
  --nav-bg: rgba(255, 255, 255, 0.85);
  --border-color: rgba(226, 232, 240, 0.8);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  --gradient-1: linear-gradient(135deg, #4F46E5 0%, #06b6d4 100%);
  --gradient-text: linear-gradient(to right, #4F46E5, #06b6d4);
  --border-radius: 16px;
  --transition: all 0.3s ease;
}

/* Dark mode overrides, typically triggered via a body class or media query, but the user asked for a "mixed design aesthetic" (clean white and dark-gradient). I will use white as base and dark gradients for sections. */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
}

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

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography Utilities */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-center { text-align: center; }
.section-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
.section-subtitle { font-size: 1.125rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 3rem; }
.section { padding: 5rem 0; }
.dark-section {
  background: #0f172a;
  color: white;
  position: relative;
  overflow: hidden;
}
.dark-section h2, .dark-section h3 { color: white; }
.dark-section .section-subtitle { color: #cbd5e1; }

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
}

header.scrolled {
  box-shadow: var(--glass-shadow);
}

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

.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-main);
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--gradient-1);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-main);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 2px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Hero Section */
.hero {
  padding: 8rem 0 5rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Subtle animated background */
.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  z-index: -1;
  animation: floatBg 15s infinite alternate ease-in-out;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  z-index: -1;
  animation: floatBg 20s infinite alternate-reverse ease-in-out;
}

@keyframes floatBg {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 50px) scale(1.1); }
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-text p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-btns {
  display: flex;
  gap: 1rem;
}

/* 3D Rotating Rectangle */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
  perspective: 1000px;
}

.rotating-rect {
  width: 250px;
  height: 350px;
  background: var(--gradient-1);
  border-radius: 20px;
  position: relative;
  transform-style: preserve-3d;
  animation: rotate3D 15s infinite linear, floatObj 4s infinite ease-in-out;
  box-shadow: inset 0 0 20px rgba(255,255,255,0.5);
}

.rotating-rect::before {
  content: '';
  position: absolute;
  top: -20px; left: -20px; right: -20px; bottom: -20px;
  background: var(--gradient-1);
  filter: blur(40px);
  opacity: 0.6;
  z-index: -1;
  border-radius: 30px;
}

.rotating-rect::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  transform: translateZ(20px);
}

@keyframes rotate3D {
  0% { transform: rotateX(160deg) rotateY(0deg) rotateZ(0deg); }
  100% { transform: rotateX(160deg) rotateY(360deg) rotateZ(360deg); }
}

@keyframes floatObj {
  0%, 100% { top: 0px; }
  50% { top: -20px; }
}

/* Tool Section */
.tool-section {
  padding: 6rem 0;
  background: white;
}

.tool-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--glass-shadow);
  padding: 2rem;
  backdrop-filter: blur(10px);
}

.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 4rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: #f8fafc;
}

.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary);
  background: #eff6ff;
}

.upload-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.workspace {
  display: none;
  flex-direction: column;
  gap: 2rem;
}

.workspace.active {
  display: flex;
}

.preview-container {
  position: relative;
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  border-radius: 12px;
  background: #e2e8f0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-container img {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
  transition: filter 0.3s;
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-group label {
  font-weight: 500;
  font-size: 0.9rem;
}

input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  margin-top: -6px;
  box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: var(--border-color);
  border-radius: 2px;
}

.loading-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 10;
}

.loading-overlay.active { display: flex; }

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* Features & Content Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  transition: var(--transition);
  box-shadow: var(--glass-shadow);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(31, 38, 135, 0.1);
  border-color: var(--primary);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

/* FAQ Section */
.faq-item {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 1rem;
  background: white;
  overflow: hidden;
}

.faq-q {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  transition: var(--transition);
}

.faq-q:hover { color: var(--primary); }

.faq-a {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-muted);
}

.faq-item.active .faq-a {
  padding: 0 1.5rem 1.5rem;
  max-height: 500px;
}

.faq-icon {
  transition: transform 0.3s;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

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

/* Footer */
footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 5rem 0 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  font-size: 1.5rem;
  color: white;
  margin-bottom: 1rem;
  display: block;
}

.footer-title {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.footer-links li { margin-bottom: 0.75rem; }
.footer-links a:hover { color: white; text-decoration: underline; }

.newsletter-form { display: flex; margin-top: 1rem; }
.newsletter-form input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: white;
  border-radius: 6px 0 0 6px;
  outline: none;
}
.newsletter-form button {
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
}

/* Contact Page specific */
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(255,255,255,0.5);
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}

.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Legal Pages */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 0;
}
.legal-content h2 { margin: 2rem 0 1rem; }
.legal-content p { margin-bottom: 1rem; }
.legal-content ul { margin-bottom: 1rem; padding-left: 2rem; list-style: disc; }

/* Content sections formatting */
.content-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 0;
}
.content-section h2 { margin-top: 3rem; margin-bottom: 1.5rem; }
.content-section h3 { margin-top: 2rem; margin-bottom: 1rem; }
.content-section p { margin-bottom: 1.25rem; font-size: 1.1rem; }

/* Responsive */
@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-btns { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding-top: 2rem;
    transition: 0.4s;
  }
  .nav-links.active { left: 0; }
  .mobile-menu-btn { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-text h1 { font-size: 2.5rem; }
}
