/* OrsonCraft Components */

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 7, 13, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--sp-2);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--text);
  text-decoration: none;
}

.logo svg { width: 36px; height: 36px; }

.logo-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  list-style: none;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color var(--duration) var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: var(--sp-1);
}

@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-1);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: var(--sp-2);
    gap: var(--sp-1);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: var(--sp-1) var(--sp-2); display: block; width: 100%; }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  padding: 10px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  box-shadow: var(--shadow-glow), var(--shadow);
  transform: translateY(-1px);
  color: white;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent-blue);
  background: rgba(47, 107, 255, 0.1);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text); background: var(--surface); }

.btn-lg { padding: 14px 32px; font-size: var(--text-base); }
.btn-sm { padding: 6px 16px; font-size: var(--text-xs); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-3);
  transition: all var(--duration) var(--ease);
}

.card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.08);
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: rgba(47, 107, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-2);
  font-size: 24px;
}

.card-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-lg);
  margin-bottom: var(--sp-1);
  color: var(--text);
}

.card-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-local {
  background: rgba(46, 230, 166, 0.12);
  color: var(--success);
}

.badge-free {
  background: rgba(47, 107, 255, 0.12);
  color: var(--accent-blue);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-2) 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
  list-style: none;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent-cyan); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--text); }

/* ===== DROP ZONE ===== */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  background: var(--bg-1);
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.03);
}

.drop-zone-icon {
  font-size: 48px;
  margin-bottom: var(--sp-2);
  opacity: 0.6;
}

.drop-zone-text {
  font-size: var(--text-lg);
  color: var(--text);
  margin-bottom: var(--sp-1);
}

.drop-zone-hint {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
}

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

/* ===== PROGRESS ===== */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: var(--sp-2) 0;
}

.progress-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: var(--radius-full);
  transition: width 300ms var(--ease);
  width: 0%;
}

/* ===== SECTION ===== */
.section {
  padding: var(--sp-8) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--sp-1);
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto var(--sp-5);
}

/* ===== GRID ===== */
.grid {
  display: grid;
  gap: var(--sp-3);
}

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

@media (max-width: 1024px) {
  .grid-4, .grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr; }
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  padding: var(--sp-6) 0 var(--sp-4);
  margin-top: var(--sp-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}

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

.footer-brand p { font-size: var(--text-sm); color: var(--text-muted); max-width: 280px; }

.footer-col h4 {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-2);
  color: var(--text);
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: var(--sp-1); }
.footer-col a { color: var(--text-muted); font-size: var(--text-sm); }
.footer-col a:hover { color: var(--accent-cyan); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: var(--sp-2);
}

/* ===== TOOL PAGE ===== */
.tool-header {
  padding: var(--sp-4) 0;
}

.tool-header h1 { margin-bottom: var(--sp-1); }

.tool-intro {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 700px;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(46, 230, 166, 0.08);
  border: 1px solid rgba(46, 230, 166, 0.2);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: var(--text-sm);
  color: var(--success);
  margin-top: var(--sp-2);
}

.tool-workspace {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  margin: var(--sp-3) 0;
}

.tool-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: var(--sp-3) 0;
  align-items: center;
}

.tool-result {
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  background: var(--bg-1);
  border-radius: var(--radius);
  display: none;
}

.tool-result.visible { display: block; }

/* ===== FORM CONTROLS ===== */
.form-group {
  margin-bottom: var(--sp-2);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  transition: border-color var(--duration) var(--ease);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.15);
}

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

.form-range {
  width: 100%;
  accent-color: var(--accent-blue);
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 800px;
}

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

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: var(--sp-2) 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: var(--text-xl);
  color: var(--text-muted);
  transition: transform var(--duration) var(--ease);
}

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

.faq-answer {
  display: none;
  padding-bottom: var(--sp-2);
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.faq-item.open .faq-answer { display: block; }

/* ===== TABLE ===== */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin: var(--sp-3) 0;
}

.specs-table th, .specs-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.specs-table th {
  background: var(--bg-1);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

.specs-table td { color: var(--text-muted); }

/* ===== RELATED TOOLS ===== */
.related-tools {
  margin: var(--sp-6) 0;
}

.related-tools h2 { margin-bottom: var(--sp-3); }

/* ===== HERO ===== */
.hero {
  padding: var(--sp-10) 0 var(--sp-8);
  text-align: center;
}

.hero h1 {
  font-size: var(--text-5xl);
  max-width: 700px;
  margin: 0 auto var(--sp-2);
}

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

.hero p {
  font-size: var(--text-xl);
  max-width: 560px;
  margin: 0 auto var(--sp-4);
}

.hero-actions {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}

.trust-row {
  display: flex;
  justify-content: center;
  gap: var(--sp-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 768px) {
  .hero h1 { font-size: var(--text-3xl); }
  .hero p { font-size: var(--text-lg); }
}

/* ===== CATEGORY GRID ===== */
.category-card {
  text-align: center;
  padding: var(--sp-3);
}

.category-card .card-icon {
  margin: 0 auto var(--sp-2);
  width: 56px;
  height: 56px;
  font-size: 28px;
}

/* ===== FILTER CHIPS ===== */
.filter-chips {
  display: flex;
  gap: var(--sp-1);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}

.chip {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  font-family: var(--font-body);
}

.chip:hover { border-color: var(--accent-blue); color: var(--text); }
.chip.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

/* ===== CONTENT ===== */
.content-section {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--sp-6) 0;
}

.content-section h2 { margin-top: var(--sp-5); }
.content-section h3 { margin-top: var(--sp-4); }
.content-section p, .content-section li { line-height: 1.8; }

/* ===== SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--border) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
