/* ==========================================================================
   VEIL DESIGN SYSTEM & APPLICATION STYLES (2026)
   ========================================================================== */

/* 1. Design Tokens & Global Variables
   ========================================================================== */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-elev: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --primary-light: #ccfbf1;
  --primary-dim: rgba(13, 148, 136, 0.1);
  
  --green: #059669;
  --green-bg: #ecfdf5;
  --red: #dc2626;

  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

  --transition-fast: 0.15s ease;
}

/* 2. Reset & Base Typography
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: 5rem;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* 3. Navigation & Header
   ========================================================================== */
.navbar {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-text {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(5, 150, 105, 0.2);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
}

.local-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-pro-header {
  background: var(--surface);
  border: 1px solid var(--border-hover);
  color: var(--text-primary);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-pro-header:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface-elev);
}

.badge-pro-active {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--green-bg);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(5, 150, 105, 0.25);
}

/* 4. Hero Section
   ========================================================================== */
.hero {
  max-width: 760px;
  margin: 0.75rem auto 1.25rem;
  text-align: center;
  padding: 0 1rem;
}

.hero-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--primary-dim);
  padding: 0.15rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.4rem;
}

.hero-title {
  font-size: clamp(1.4rem, 3.8vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.hero-title span {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.45;
  max-width: 580px;
  margin: 0 auto 0.75rem;
}

.trust-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.trust-pill svg {
  color: var(--green);
}

/* 5. Main Container & Tool Cards
   ========================================================================== */
main {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem 1.25rem;
  transition: all var(--transition-fast);
}

/* Dropzone */
.dropzone {
  text-align: center;
  border: 2px dashed var(--border-hover);
  background: var(--surface);
  cursor: default;
}

.dropzone.drag-active {
  border-color: var(--primary);
  background: var(--primary-dim);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  background: var(--surface-elev);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.dropzone-icon svg {
  width: 28px;
  height: 28px;
}

/* Primary & Secondary Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--primary);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.95rem 2.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
  transition: all var(--transition-fast);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border-hover);
  color: var(--text-primary);
  padding: 0.85rem 1.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-elev);
  border-color: var(--text-secondary);
}

.sub-pick-container {
  margin-top: 0.65rem;
}

.sub-pick-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-family: inherit;
}

.sub-pick-btn:hover {
  color: var(--primary);
}

/* Options & Triggers */
.options-row {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 17px;
  height: 17px;
  cursor: pointer;
}

.activate-trigger {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: inherit;
}

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

.format-pills {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* 6. Workspace & Progress Panel
   ========================================================================== */
.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.progress-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.progress-count {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
}

.progress-track {
  width: 100%;
  height: 10px;
  background: var(--surface-elev);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #14b8a6);
  border-radius: var(--radius-full);
  transition: width 0.2s ease;
}

.progress-filename {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Done Panel */
.done-view {
  text-align: center;
  padding: 1rem 0;
}

.done-icon {
  width: 60px;
  height: 60px;
  background: var(--green-bg);
  color: var(--green);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.done-icon svg {
  width: 32px;
  height: 32px;
}

.done-summary {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.done-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Log Box */
.log-box {
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  max-height: 160px;
  overflow-y: auto;
  color: var(--text-secondary);
}

.log-box div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 7. Modal & Overlays
   ========================================================================== */
#proModal {
  text-align: center;
}

.modal-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--primary-dim);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.modal-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.modal-desc {
  font-size: 0.98rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 1.5rem;
}

.pro-cta-card {
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.pro-benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  text-align: left;
}

.benefit-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.benefit-item strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.benefit-item span {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
  display: block;
}

.code-input-group {
  display: flex;
  gap: 0.5rem;
  max-width: 380px;
  margin: 0.75rem auto 0;
}

.code-input-group input {
  flex: 1;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text-primary);
}

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

.code-input-group button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.code-input-group button:hover {
  background: var(--primary-hover);
}

/* 8. Pricing Section
   ========================================================================== */
.pricing-section {
  max-width: 820px;
  margin: 2.75rem auto 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2.25rem;
}

.section-header h2 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.pricing-card.highlight {
  border-color: var(--primary);
  box-shadow: 0 8px 24px -4px rgba(13, 148, 136, 0.15);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

.plan-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.plan-price-row {
  margin-bottom: 1.25rem;
}

.plan-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.plan-period {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.plan-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.plan-features {
  list-style: none;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.plan-features li {
  font-size: 0.9rem;
  color: var(--text-primary);
  padding: 0.45rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.plan-features li svg {
  color: var(--green);
  flex-shrink: 0;
}

.plan-action {
  margin-top: auto;
}

.plan-terms-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  text-align: center;
  line-height: 1.4;
}

/* 9. Technical Architecture & FAQ
   ========================================================================== */
.tech-section {
  max-width: 820px;
  margin: 4.5rem auto 0;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.tech-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.tech-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.tech-card-icon {
  width: 34px;
  height: 34px;
  background: var(--surface-elev);
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tech-card strong {
  font-size: 1rem;
  color: var(--text-primary);
}

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

/* FAQ */
.faq-section {
  max-width: 820px;
  margin: 4.5rem auto 0;
}

.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
}

.faq-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.faq-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 10. Footer
   ========================================================================== */
footer {
  max-width: 820px;
  margin: 5rem auto 0;
  padding: 2.5rem 1.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

footer p {
  margin-bottom: 0.85rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin: 1.5rem 0;
  font-weight: 500;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

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

.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.5;
}

/* 11. Responsive Breakpoints
   ========================================================================== */
@media (max-width: 680px) {
  .navbar { padding: 1rem; }
  .hero { margin: 1rem auto 2rem; padding: 0 1rem; }
  main { padding: 0 1rem; }
  .card { padding: 1.75rem 1.25rem; }
  .pricing-grid, .tech-grid, .pro-benefits-grid { grid-template-columns: 1fr; }
  .btn-primary { width: 100%; justify-content: center; }
  .done-actions button { width: 100%; }
}
