/* ===== CSS Variables & Theme ===== */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1424;
  --bg-card: #141a30;
  --bg-card-hover: #1a213d;
  --text-primary: #e8ecf4;
  --text-secondary: #8896b8;
  --text-muted: #5a6a8a;
  --accent-1: #10b981;
  --accent-2: #0d9488;
  --accent-3: #6366f1;
  --accent-4: #f59e0b;
  --gradient-1: linear-gradient(135deg, #10b981, #0d9488);
  --gradient-2: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-3: linear-gradient(135deg, #0d9488, #6366f1);
  --glow-primary: rgba(16, 185, 129, 0.15);
  --glow-secondary: rgba(99, 102, 241, 0.15);
  --border-color: rgba(148, 163, 184, 0.08);
  --border-color-hover: rgba(148, 163, 184, 0.2);
  --header-height: 64px;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== Animated Background ===== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 15% 30%, rgba(16, 185, 129, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(99, 102, 241, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 80%, rgba(13, 148, 136, 0.03) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle grid overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 14, 26, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-inner {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.header-logo span {
  font-size: 20px;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 8px;
}

.header-nav a:hover {
  color: var(--text-primary);
  background: rgba(16, 185, 129, 0.08);
}

/* Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ===== Main Content ===== */
.main-content {
  padding-top: var(--header-height);
  min-height: calc(100vh - var(--header-height) - 200px);
  position: relative;
  z-index: 1;
}

/* ===== Hero Section ===== */
.hero {
  padding: 100px 24px 60px;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 65%);
  border-radius: 50%;
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
}

.hero-visual-inner {
  width: 300px;
  height: 300px;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  background: var(--gradient-1);
  opacity: 0.15;
  animation: morphBlob 8s ease-in-out infinite;
}

@keyframes morphBlob {
  0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
  50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
  75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
  100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

.hero-visual .orb-2 {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--gradient-2);
  opacity: 0.08;
  top: -20px;
  right: -20px;
  animation: pulseGlow 5s ease-in-out infinite 1s;
}

.hero-visual .orb-3 {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--gradient-3);
  opacity: 0.06;
  bottom: -10px;
  left: -10px;
  animation: pulseGlow 6s ease-in-out infinite 2s;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 100px;
  font-size: 13px;
  color: var(--accent-1);
  margin-bottom: 28px;
  letter-spacing: 0.3px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero h1 .highlight {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ===== Section Titles ===== */
.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ===== Tools Section ===== */
.tools-section {
  padding: 80px 24px 100px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.tools-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 40px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 36px;
  align-items: center;
}

.tool-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

.tool-card:hover {
  border-color: rgba(16, 185, 129, 0.2);
  transform: translateX(6px);
  box-shadow: 0 8px 40px rgba(16, 185, 129, 0.06);
}

.tool-card:nth-child(2)::before {
  background: var(--gradient-2);
}

.tool-card:nth-child(2):hover {
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 8px 40px rgba(99, 102, 241, 0.06);
}

.tool-card:nth-child(3)::before {
  background: var(--gradient-3);
}

.tool-card:nth-child(3):hover {
  border-color: rgba(13, 148, 136, 0.2);
  box-shadow: 0 8px 40px rgba(13, 148, 136, 0.06);
}

.tool-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  flex-shrink: 0;
  transition: transform 0.4s ease;
}

.tool-card:nth-child(1) .tool-icon {
  background: rgba(16, 185, 129, 0.12);
}

.tool-card:nth-child(2) .tool-icon {
  background: rgba(99, 102, 241, 0.12);
}

.tool-card:nth-child(3) .tool-icon {
  background: rgba(13, 148, 136, 0.12);
}

.tool-card:hover .tool-icon {
  transform: scale(1.1) rotate(-3deg);
}

.tool-card-text h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.tool-card-text p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 600px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

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

.btn-outline:hover {
  border-color: var(--accent-1);
  background: rgba(16, 185, 129, 0.08);
  color: var(--accent-1);
}

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

/* ===== Footer ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 48px 24px 28px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-col-brand p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
  margin-top: 12px;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-1);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  padding: 5px 0;
  transition: color 0.3s ease;
}

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

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

.footer-bottom p {
  color: var(--text-muted);
  font-size: 12px;
}

/* ===== Page Header ===== */
.page-header {
  text-align: center;
  padding: 80px 24px 40px;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== Tool Page Layout ===== */
.tool-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

.tool-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 36px;
  margin-bottom: 36px;
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group textarea,
.form-group input[type="text"],
.form-group select {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  resize: vertical;
}

.form-group textarea:focus,
.form-group input[type="text"]:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px var(--glow-primary);
}

.form-group textarea {
  min-height: 100px;
}

.form-group select {
  cursor: pointer;
}

/* File upload */
.file-upload {
  position: relative;
  border: 2px dashed var(--border-color);
  border-radius: 14px;
  padding: 50px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.file-upload:hover {
  border-color: var(--accent-1);
  background: rgba(16, 185, 129, 0.04);
}

.file-upload.has-file {
  border-color: var(--accent-1);
  border-style: solid;
  padding: 20px;
}

.file-upload input[type="file"] {
  display: none;
}

.file-upload .upload-icon {
  font-size: 36px;
  margin-bottom: 10px;
  opacity: 0.6;
}

.file-upload p {
  color: var(--text-secondary);
  font-size: 13px;
}

.file-upload .file-name {
  color: var(--accent-1);
  font-weight: 500;
  margin-top: 6px;
}

.file-preview {
  max-width: 280px;
  max-height: 280px;
  border-radius: 10px;
  margin: 14px auto 0;
  display: none;
}

.file-preview.show {
  display: block;
}

/* Outpainting controls */
.outpaint-controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-group label {
  font-size: 12px;
  color: var(--text-secondary);
}

.control-group input[type="number"] {
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.control-group input[type="number"]:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px var(--glow-primary);
}

/* ===== Result Area ===== */
.result-area {
  display: none;
}

.result-area.show {
  display: block;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 28px;
  text-align: center;
}

.result-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--text-secondary);
}

.result-card img {
  max-width: 100%;
  max-height: 512px;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  margin-bottom: 18px;
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Loading Spinner ===== */
.loading {
  display: none;
  text-align: center;
  padding: 60px 24px;
}

.loading.show {
  display: block;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(16, 185, 129, 0.1);
  border-top-color: var(--accent-1);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

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

.loading p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===== Legal Pages ===== */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 40px 0 16px;
  color: var(--text-primary);
}

.legal-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--text-primary);
}

.legal-content p,
.legal-content li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-content ul,
.legal-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-content strong {
  color: var(--text-primary);
}

.legal-content .last-updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 40px;
}

/* Data collection table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 32px;
  border-radius: 10px;
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.data-table th {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  color: var(--text-secondary);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(16, 185, 129, 0.03);
}

/* ===== Contact Page ===== */
.contact-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 60px 24px 100px;
  text-align: center;
}

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

.contact-icon {
  font-size: 44px;
  margin-bottom: 18px;
}

.contact-card h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.contact-card p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.contact-email {
  display: inline-block;
  padding: 13px 30px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 10px;
  color: var(--accent-1);
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-email:hover {
  background: rgba(16, 185, 129, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

/* ===== Inline Section Styles (reusable) ===== */
.section-block {
  padding: 60px 24px 80px;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ===== Steps Grid ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}

.step-card {
  text-align: center;
  padding: 36px 24px;
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.15);
  box-shadow: 0 12px 40px rgba(16, 185, 129, 0.05);
}

.step-number {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}

.step-card:nth-child(1) .step-number {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-1);
}

.step-card:nth-child(2) .step-number {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-3);
}

.step-card:nth-child(3) .step-number {
  background: rgba(13, 148, 136, 0.15);
  color: var(--accent-2);
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.step-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ===== Use Cases Grid ===== */
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.usecase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 30px;
  transition: all 0.3s ease;
}

.usecase-card:hover {
  border-color: rgba(99, 102, 241, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.04);
}

.usecase-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.usecase-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.8;
}

/* ===== About Grid ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 36px;
  transition: all 0.3s ease;
}

.about-card:hover {
  border-color: rgba(16, 185, 129, 0.12);
}

.about-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--accent-1);
}

.about-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.9;
  margin-bottom: 12px;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.about-card strong {
  color: var(--text-primary);
}

/* ===== Result Grid for images ===== */
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

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

/* ===== Blog Styles ===== */
.blog-search {
  max-width: 560px;
  margin: 0 auto 40px;
  position: relative;
}

.blog-search input {
  width: 100%;
  padding: 14px 20px 14px 46px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s;
}

.blog-search input:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px var(--glow-primary);
}

.blog-search .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: 0.5;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 26px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.blog-card:hover {
  border-color: rgba(16, 185, 129, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(16, 185, 129, 0.04);
}

.blog-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card .excerpt {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.blog-card .meta span:last-child {
  color: var(--accent-1);
  font-weight: 500;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 24px 60px;
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
}

.pagination button {
  padding: 9px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.3s;
}

.pagination button:hover {
  border-color: var(--accent-1);
  color: var(--text-primary);
}

.pagination button.active {
  background: var(--gradient-1);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.no-results {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
  font-size: 1rem;
  grid-column: 1 / -1;
}

/* ===== Article Page ===== */
.article-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.article-page h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

.article-page .article-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.article-page h2 {
  font-size: 1.45rem;
  font-weight: 600;
  margin: 40px 0 16px;
  color: var(--text-primary);
}

.article-page h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--text-primary);
}

.article-page p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 16px;
}

.article-page ul, .article-page ol {
  padding-left: 24px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.85;
}

.article-page li {
  margin-bottom: 8px;
}

.article-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-1);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 24px;
  font-weight: 500;
}

.article-page .back-link:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

/* ===== Shared Guide Card & FAQ Styles ===== */
.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
  transition: border-color 0.3s;
}

.guide-card:hover {
  border-color: rgba(16, 185, 129, 0.1);
}

.guide-card h3 {
  font-size: 1.1rem;
  margin-bottom: 14px;
  color: var(--accent-1);
}

.guide-card p,
.guide-card li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.guide-card ul {
  padding-left: 20px;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 14px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-q {
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.faq-q::after {
  content: '+';
  font-size: 18px;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.faq-q.open::after {
  content: '−';
}

.faq-a {
  max-height: 0 !important;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  padding-top: 0;
}

.faq-a.open {
  max-height: 500px !important;
  padding-top: 12px;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 80px 24px 50px;
    text-align: center;
  }

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

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

  .hero-visual {
    display: none;
  }

  .usecases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
  }

  .header-nav.active {
    display: flex;
  }

  .header-nav a {
    padding: 12px 16px;
    width: 100%;
  }

  .hamburger {
    display: flex;
  }

  .tool-card {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
    padding: 30px;
  }

  .tool-icon {
    margin: 0 auto;
  }

  .tool-card-text p {
    max-width: 100%;
  }

  .tools-grid {
    gap: 18px;
  }

  .tools-section {
    padding: 50px 16px 60px;
  }

  .hero {
    padding: 60px 16px 40px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }

  .footer-col-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .tool-form {
    padding: 24px;
  }

  .outpaint-controls {
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: 36px 24px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .usecases-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    padding: 60px 20px 30px;
  }
  .page-header h1 {
    font-size: 1.8rem;
  }

  .tool-page {
    padding: 24px 16px 60px;
  }

  .guide-card {
    padding: 24px;
  }

  .result-card {
    padding: 20px;
  }

  .file-upload {
    padding: 36px 20px;
  }

  .section-block {
    padding: 40px 16px 60px;
  }

  .article-page {
    padding: 24px 16px 60px;
  }
  .article-page h1 {
    font-size: 1.5rem;
  }
  .article-page h2 {
    font-size: 1.2rem;
  }

  .contact-page {
    padding: 40px 16px 60px;
  }

  .role-selector {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
  }
  .role-btn {
    padding: 12px 14px;
    font-size: 13px;
  }

  .mode-selector {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
  }
  .mode-btn {
    padding: 12px 10px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 50px 16px 30px;
  }
  .hero h1 {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }
  .hero p {
    font-size: 0.92rem;
  }

  .tool-page {
    padding: 16px 12px 40px;
  }
  .tool-form {
    padding: 18px;
  }
  .guide-card {
    padding: 20px;
  }
  .result-card {
    padding: 16px;
  }
  .result-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .page-header {
    padding: 50px 16px 24px;
  }
  .page-header h1 {
    font-size: 1.5rem;
  }

  .legal-content {
    padding: 24px 16px 60px;
  }

  .contact-card {
    padding: 28px 18px;
  }

  .file-upload {
    padding: 28px 16px;
  }

  .role-selector {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  .mode-selector {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .blog-grid {
    padding: 0 16px;
    gap: 12px;
  }
  .blog-card {
    padding: 18px;
  }

  .article-page {
    padding: 16px 12px 40px;
  }
}

@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
}