/* iluv.tools — AI Tools Suite. No account. No tracking. */
/* Tailwind CSS loaded via CDN in HTML */

:root {
  --color-primary: #D33A2C;
  --color-primary-dark: #B03025;
  --color-primary-light: rgba(211,58,44,0.06);
  --color-accent: #f59e0b;
  --color-success: #059669;
  --color-warning: #d97706;
  --color-danger: #dc2626;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --white: #FFFFFE;
  --black: #000000;

  --header-bg: rgba(255,255,254,0.96);
  --header-border: #D9D5CE;
  --header-text: #1A1A1A;
  --header-text-secondary: #6B6B6B;

  --radius-sm: 2px;
  --radius: 4px;
  --radius-lg: 6px;
  --radius-xl: 8px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,.04), 0 2px 4px rgba(0,0,0,.03);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.05), 0 4px 6px rgba(0,0,0,.03);
  --shadow-xl: 0 20px 25px rgba(0,0,0,.05), 0 10px 10px rgba(0,0,0,.02);

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;

  --max-width: 1200px;
  --header-height: 52px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: #1A1A1A;
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Header — paper white, minimal, monospace logo */
.header {
  background: var(--header-bg);
  border-bottom: 2px solid #1A1A1A;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  height: var(--header-height);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.logo {
  font-family: 'SF Mono', 'Consolas', 'Courier New', monospace;
  font-size: .9375rem;
  font-weight: 700;
  color: var(--header-text);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

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

.nav {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: wrap;
}

.nav a {
  color: var(--header-text-secondary);
  text-decoration: none;
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  transition: color .1s;
}

.nav a:hover,
.nav a.active {
  color: var(--header-text);
  background: none;
}

/* Tools dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  color: var(--header-text-secondary);
  text-decoration: none;
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.nav-dropdown-toggle:hover { color: var(--header-text); }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--header-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  min-width: 200px;
  padding: 4px 0;
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu { display: block; }

.nav-dropdown-menu a {
  display: block;
  padding: 6px 16px;
  font-size: .75rem;
  border-radius: 0;
  color: var(--header-text);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}

.nav-dropdown-menu a:hover { background: var(--gray-50); }

/* Mobile nav */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--header-text-secondary);
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 16px;
    box-shadow: var(--shadow-lg);
  }
}

/* Hero — reference manual style */
.hero {
  padding: 56px 0 40px;
  text-align: left;
  background: var(--white);
  border-bottom: 2px solid #1A1A1A;
}

.hero h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
  margin-bottom: 8px;
  color: #1A1A1A;
  font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.hero-sub {
  font-size: .875rem;
  color: #6B6B6B;
  max-width: 600px;
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .hero { padding: 40px 0 28px; }
  .hero h1 { font-size: 1.125rem; }
  .hero-sub { font-size: .8125rem; }
}

/* Buttons — flat, minimal */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: .8125rem;
  font-weight: 600;
  border-radius: 2px;
  text-decoration: none;
  border: 1px solid #1A1A1A;
  cursor: pointer;
  transition: all .1s;
  font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.4;
  background: #1A1A1A;
  color: #FFFFFE;
}

.btn:hover { background: #D33A2C; border-color: #D33A2C; color: #FFFFFE; }

.btn-primary {
  background: #1A1A1A;
  color: #FFFFFE;
  border: 1px solid #1A1A1A;
}

.btn-primary:hover { background: #D33A2C; border-color: #D33A2C; }

.btn-secondary {
  background: #FFFFFE;
  color: #1A1A1A;
  border: 1px solid #D9D5CE;
}

.btn-secondary:hover { background: #F7F5F1; border-color: #1A1A1A; color: #1A1A1A; }

.btn-lg { padding: 14px 28px; font-size: .9375rem; }
.btn-sm { padding: 6px 14px; font-size: .75rem; }

/* Card grids */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.tool-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: box-shadow .2s, transform .2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.tool-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-primary);
}

.tool-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--gray-900);
}

.tool-card p {
  font-size: .875rem;
  color: var(--gray-500);
  line-height: 1.5;
}

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

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

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

.section-header p {
  font-size: 1.0625rem;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .section { padding: 48px 0; }
  .section-header h2 { font-size: 1.375rem; }
}

/* Footer */
.footer {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  padding: 48px 0 32px;
  color: var(--gray-500);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: .875rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.footer-col a {
  display: block;
  color: var(--gray-500);
  text-decoration: none;
  font-size: .875rem;
  padding: 4px 0;
  transition: color .15s;
}

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

.footer-bottom {
  border-top: 1px solid var(--gray-200);
  padding-top: 24px;
  text-align: center;
  font-size: .8125rem;
}

/* Ad slots */
.ad-horizontal {
  text-align: center;
  padding: 24px 0;
  background: var(--gray-50);
  border: 1px dashed var(--gray-200);
  border-radius: var(--radius);
  margin: 24px 0;
  color: var(--gray-500);
  font-size: .875rem;
}

/* Trust badges */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.trust-badges span {
  font-size: .8125rem;
  color: var(--gray-500);
  background: var(--white);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
}

/* Tool page layout */
.tool-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px;
}

.tool-container h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.tool-container .tool-desc {
  font-size: 1.0625rem;
  color: var(--gray-500);
  margin-bottom: 32px;
}

/* Form elements */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--gray-700);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 14px;
  font-size: .9375rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  background: var(--white);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

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

/* FAQ */
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 16px 20px;
  text-align: left;
  background: var(--white);
  border: none;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover { background: var(--gray-50); }

.faq-answer {
  padding: 0 20px 16px;
  font-size: .9375rem;
  color: var(--gray-500);
  display: none;
}

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

/* Utility */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.hidden { display: none !important; }

/* Loading spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}

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

/* Generated output box */
.output-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 16px;
  font-size: .9375rem;
  line-height: 1.7;
  max-height: 500px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--gray-900);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: .875rem;
  z-index: 9999;
  animation: slideUp .3s ease-out;
  box-shadow: var(--shadow-lg);
}

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

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.drop-zone-content svg { margin: 0 auto 12px; color: var(--gray-500); }
.drop-zone-content p { margin: 4px 0; }

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
  margin: 16px 0;
}

.progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 4px;
  transition: width .3s ease;
}

/* Result Container */
.result-container {
  margin-top: 24px;
}

/* Feature Grid (for landing pages) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.feature-card {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
}

.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: .875rem; color: var(--gray-500); }

/* Chip / Tag */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: .8125rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  cursor: pointer;
  transition: all .15s;
}

.chip:hover,
.chip.selected {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Tab navigation */
.tabs-nav {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 16px;
}

.tab-btn {
  padding: 10px 20px;
  font-size: .875rem;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--gray-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .15s;
  font-family: inherit;
}

.tab-btn:hover { color: var(--gray-700); }
.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Benefits list */
.benefits-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.benefits-list li {
  padding: 8px 0;
  font-size: .9375rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.benefits-list li::before { content: '✅'; flex-shrink: 0; }

/* ============================================================
   Tool Finder
   ============================================================ */
.tool-finder-container {
  max-width: 900px;
  margin: 0 auto;
}

.finder-search {
  position: relative;
  margin-bottom: 16px;
}

.finder-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  pointer-events: none;
}

.finder-input {
  width: 100%;
  padding: 16px 48px 16px 48px;
  font-size: 1.0625rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}

.finder-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-light);
}

.finder-input::placeholder { color: var(--gray-300); }

.finder-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gray-200);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.125rem;
  cursor: pointer;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.finder-clear:hover { background: var(--gray-300); color: var(--gray-700); }

.finder-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.cat-chip {
  padding: 6px 14px;
  font-size: .8125rem;
  font-weight: 500;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  white-space: nowrap;
}

.cat-chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.cat-chip.selected {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.finder-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: .8125rem;
  color: var(--gray-500);
}

.finder-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: .8125rem;
  color: var(--gray-500);
}

.finder-toggle input { cursor: pointer; }

.finder-results { min-height: 100px; }

.finder-empty {
  text-align: center;
  padding: 48px 24px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
}

.finder-cat-group { margin-bottom: 28px; }

.finder-cat-title {
  font-size: .9375rem;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-700);
}

.finder-cat-count {
  font-size: .75rem;
  font-weight: 400;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 1px 8px;
  border-radius: 999px;
}

.finder-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.finder-tool-card {
  display: block;
  padding: 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.finder-tool-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.finder-tool-card.planned {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.finder-tool-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.finder-tool-icon { font-size: 1.125rem; flex-shrink: 0; }

.finder-tool-name {
  font-weight: 600;
  font-size: .875rem;
  flex: 1;
}

.finder-tool-desc {
  font-size: .75rem;
  color: var(--gray-500);
  line-height: 1.4;
  margin: 0;
}

.finder-badge {
  display: inline-block;
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.ai-badge {
  background: #dbeafe;
  color: #1d4ed8;
}

.planned-badge {
  background: var(--gray-200);
  color: var(--gray-500);
}

.migrating-badge {
  background: #fef3c7;
  color: #92400e;
}

@media (max-width: 640px) {
  .finder-tool-grid { grid-template-columns: 1fr; }
  .finder-categories { gap: 4px; }
  .cat-chip { font-size: .75rem; padding: 5px 10px; }
}

/* FAQ details/summary arrow rotation */
#faq details[open] > summary span {
  transform: rotate(180deg);
}
