/* 
=========================================
   Blur Image Tool - Custom Stylesheet
=========================================
*/

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

/* Color Variables & Root Definitions */
:root {
  --primary-orange: #FF6B00;
  --dark-orange: #E65C00;
  --black: #111111;
  --white: #FFFFFF;
  --light-gray: #F5F5F5;
  --dark-gray: #1A1A1A;
  
  /* Theme Variables (Controlled by JS scroll transition) */
  --theme-bg: rgb(255, 255, 255);
  --theme-text: rgb(17, 17, 17);
  --theme-card-bg: rgb(245, 245, 245);
  --theme-card-border: rgb(224, 224, 224);
  --theme-text-muted: rgb(102, 102, 102);
  --theme-shadow: rgba(0, 0, 0, 0.08);
  
  /* General Variables */
  --font-family: 'Outfit', sans-serif;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --max-width: 1200px;
}

/* Reset and Core Layout */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  background-color: var(--theme-bg);
  color: var(--theme-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  transition: background-color 0.1s ease, color 0.1s ease;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.5em;
}

h1 {
  font-size: 3rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.25rem;
  letter-spacing: -0.01em;
  margin-top: 1.5em;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--theme-text-muted);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary-orange);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.3);
}

.btn-primary:hover {
  background-color: var(--dark-orange);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--theme-text);
  border: 2px solid var(--theme-card-border);
}

.btn-secondary:hover {
  background-color: var(--theme-card-bg);
  border-color: var(--theme-text);
  transform: translateY(-2px);
}

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

.btn-outline-orange:hover {
  background-color: var(--primary-orange);
  color: var(--white);
  transform: translateY(-2px);
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--theme-card-border);
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

body.dark-header header {
  background-color: rgba(17, 17, 17, 0.8);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--theme-text);
}

.logo span {
  color: var(--primary-orange);
}

.logo svg {
  fill: var(--primary-orange);
  width: 32px;
  height: 32px;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 32px;
}

.nav-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--theme-text-muted);
  position: relative;
  padding: 8px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-orange);
  transition: width var(--transition-fast);
}

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

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--theme-text);
  font-weight: 600;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--theme-text);
  margin: 6px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  padding: 100px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
  min-height: calc(100vh - 80px);
}

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

.hero h1 {
  margin-bottom: 24px;
  line-height: 1.15;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 40px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
}

.hero-illustration {
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-svg-container {
  width: 100%;
  max-width: 480px;
  position: relative;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* Tool / Editor Section */
.tool-section {
  padding: 80px 0;
}

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

.section-header h2 {
  margin-top: 0;
}

.editor-wrapper {
  background-color: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 20px 40px var(--theme-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

/* Upload State */
.upload-container {
  padding: 80px 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.upload-container:hover, .upload-container.dragover {
  background-color: rgba(255, 107, 0, 0.04);
}

.upload-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: rgba(255, 107, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: var(--transition-normal);
}

.upload-container:hover .upload-icon {
  transform: scale(1.1);
  background-color: rgba(255, 107, 0, 0.2);
}

.upload-icon svg {
  width: 36px;
  height: 36px;
  fill: var(--primary-orange);
}

.upload-text h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--theme-text);
}

.upload-text p {
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.file-input {
  display: none;
}

/* Editor Workspace (Active State) */
.editor-workspace {
  display: none; /* Shown via JS when image uploaded */
  flex-direction: column;
  height: 680px;
  position: relative;
}

.editor-workspace.active {
  display: flex;
}

/* Editor Top Bar */
.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background-color: var(--theme-card-bg);
  border-bottom: 1px solid var(--theme-card-border);
  flex-wrap: wrap;
  gap: 12px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--theme-text-muted);
  margin-right: 4px;
}

/* Editor Buttons */
.tool-btn {
  background-color: var(--theme-bg);
  border: 1px solid var(--theme-card-border);
  color: var(--theme-text);
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.tool-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.tool-btn:hover {
  background-color: var(--theme-card-border);
}

.tool-btn.active {
  background-color: var(--primary-orange);
  color: var(--white);
  border-color: var(--primary-orange);
}

.tool-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Range Inputs */
.slider-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 6px;
  border-radius: 3px;
  background: var(--theme-card-border);
  outline: none;
  transition: background 0.3s;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-orange);
  cursor: pointer;
  transition: transform 0.1s;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.slider-val {
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 28px;
}

/* Canvas Area */
.canvas-container {
  flex: 1;
  background-color: #eef2f5;
  background-image: radial-gradient(#cbd5e1 1px, transparent 0);
  background-size: 16px 16px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.dark-header .canvas-container {
  background-color: #1e293b;
  background-image: radial-gradient(#475569 1px, transparent 0);
}

.canvas-wrapper {
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease-out;
  transform-origin: center center;
}

#editorCanvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  cursor: crosshair;
  background-color: white;
}

/* Zoom Overlay */
.zoom-indicator {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  margin-top: 50px;
}

.feature-card {
  background-color: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: var(--border-radius-md);
  padding: 32px;
  text-align: left;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 30px var(--theme-shadow);
  border-color: rgba(255, 107, 0, 0.4);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--border-radius-sm);
  background-color: rgba(255, 107, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--primary-orange);
  transition: var(--transition-normal);
}

.feature-card:hover .feature-icon {
  background-color: var(--primary-orange);
  color: var(--white);
  transform: scale(1.1) rotate(5deg);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* How It Works Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-top: 50px;
}

.step-card {
  text-align: center;
  position: relative;
}

.step-num {
  font-size: 5rem;
  font-weight: 800;
  color: rgba(255, 107, 0, 0.12);
  line-height: 1;
  margin-bottom: -20px;
}

.step-content {
  background-color: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: var(--border-radius-md);
  padding: 32px 24px;
  position: relative;
  z-index: 2;
  transition: var(--transition-normal);
}

.step-card:hover .step-content {
  transform: translateY(-5px);
  border-color: var(--primary-orange);
}

.step-content h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.step-content p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Benefits Section */
.benefits-section {
  padding: 80px 0;
}

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
}

.benefits-grid.reverse {
  grid-template-columns: 1fr 1fr;
}

.benefits-content {
  max-width: 500px;
}

.benefits-icon-list {
  list-style: none;
  margin-top: 24px;
}

.benefits-icon-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 1.05rem;
  font-weight: 500;
}

.benefits-icon-list svg {
  width: 20px;
  height: 20px;
  fill: var(--primary-orange);
}

.benefits-image {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.benefits-image img {
  width: 100%;
  display: block;
  transition: var(--transition-slow);
}

.benefits-image:hover img {
  transform: scale(1.05);
}

/* SEO Content Section */
.seo-section {
  padding: 80px 0;
}

.seo-content-wrapper {
  max-width: 840px;
  margin: 0 auto;
}

.seo-content-wrapper p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.seo-content-wrapper h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* FAQs Section */
.faq-section {
  padding: 80px 0;
}

.faq-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--theme-card-border);
  padding: 24px 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
}

.faq-question svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: transform var(--transition-fast);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.faq-answer p {
  padding-top: 16px;
  margin-bottom: 0;
}

.faq-item.active .faq-question svg {
  transform: rotate(45deg);
  color: var(--primary-orange);
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

/* Layout for Inner Pages (About, Contact, Privacy, Disclaimer) */
.inner-page-hero {
  padding: 80px 0 40px 0;
  text-align: center;
}

.inner-page-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.inner-page-content {
  padding: 40px 0 80px 0;
}

.inner-page-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

/* Contact Page Specifics */
.contact-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 48px;
}

.contact-card {
  background-color: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: var(--border-radius-md);
  padding: 40px;
}

.contact-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-info-item {
  display: flex;
  gap: 16px;
}

.contact-info-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-sm);
  background-color: rgba(255, 107, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-orange);
  flex-shrink: 0;
}

.contact-info-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.contact-info-text h4 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.contact-info-text p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* Form Styling */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--theme-text);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--theme-card-border);
  background-color: var(--theme-bg);
  color: var(--theme-text);
  font-family: var(--font-family);
  font-size: 1rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus {
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

textarea.form-input {
  resize: vertical;
  min-height: 150px;
}

.form-status {
  padding: 16px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 24px;
  display: none;
  font-weight: 500;
}

.form-status.success {
  display: block;
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-status.error {
  display: block;
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Footer (Complete Dark Mode by default) */
footer {
  background-color: var(--black);
  color: var(--white);
  padding: 80px 0 30px 0;
  border-top: 1px solid #222222;
  margin-top: auto;
  font-size: 0.95rem;
}

footer p {
  color: #888888;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 20px;
}

.footer-logo span {
  color: var(--primary-orange);
}

.footer-socials {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #1e1e1e;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbbbbb;
  transition: all var(--transition-normal);
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social-link:hover {
  transform: translateY(-3px);
  color: var(--white);
}

.social-link.fb:hover { background-color: #1877F2; }
.social-link.ig:hover { background-color: #E4405F; }
.social-link.tw:hover { background-color: #000000; }
.social-link.li:hover { background-color: #0A66C2; }

.footer-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--white);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #bbbbbb;
}

.footer-links a:hover {
  color: var(--primary-orange);
  padding-left: 4px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.newsletter-input {
  flex: 1;
  background-color: #1e1e1e;
  border: 1px solid #333333;
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--border-radius-sm);
  outline: none;
  font-family: var(--font-family);
}

.newsletter-input:focus {
  border-color: var(--primary-orange);
}

.newsletter-btn {
  background-color: var(--primary-orange);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.newsletter-btn:hover {
  background-color: var(--dark-orange);
}

.footer-bottom {
  border-top: 1px solid #222222;
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* Animations using Scroll Observer */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  .hero { gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  body.nav-active {
    overflow: hidden;
  }
  
  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--theme-bg);
    flex-direction: column;
    padding: 40px 24px;
    gap: 24px;
    z-index: 999;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    overflow-y: auto;
    border-top: 1px solid var(--theme-card-border);
  }
  
  .nav-menu.active {
    transform: translateX(0);
  }
  
  .nav-toggle {
    display: block;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .hero {
    grid-template-columns: 1fr;
    padding: 60px 0;
    gap: 48px;
    text-align: center;
  }
  
  .hero-content {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .hero-ctas {
    justify-content: center;
  }
  
  .benefits-grid, .benefits-grid.reverse {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .benefits-grid.reverse .benefits-image {
    order: -1;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .editor-toolbar {
    padding: 8px 12px;
  }
  
  .editor-workspace {
    height: auto;
    min-height: 500px;
  }
  
  .canvas-container {
    min-height: 350px;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }
  .hero-ctas .btn {
    width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .newsletter-form {
    flex-direction: column;
  }
}
