/* ========================================
   TextClean.io — Global Design System
   ======================================== */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  --color-primary: #0ea5e9;
  --color-primary-dark: #0284c7;
  --color-primary-light: #e0f2fe;
  --color-accent: #22c55e;
  --color-accent-dark: #16a34a;
  --color-warning: #f59e0b;
  --color-dark: #0b2f4a;
  --color-bg: #f8fafc;
  --color-bg-white: #ffffff;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  --font-mono: 'SF Mono', 'Consolas', 'Courier New', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 2.5rem;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --header-height: 68px;
  --transition: 0.2s ease;
}

/* ===== DARK MODE VARS ===== */
body.dark-mode {
  --color-bg: #0b1929;
  --color-bg-white: #12253a;
  --color-text: #d0e2ee;
  --color-text-muted: #7a9bb5;
  --color-border: #1e3a56;
  --color-border-light: #162a42;
  --color-dark: #0a1f33;
  --color-primary-light: #0f2a3e;
}

/* ===== RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== HEADER ===== */
.tc-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-bg-white);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.tc-site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.tc-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.tc-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.tc-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #0ea5e9, #22c55e);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  font-weight: 800;
  font-family: var(--font-mono);
}

.tc-logo-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.5px;
}

.tc-logo-text span {
  color: var(--color-primary);
}

/* Nav */
.tc-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.tc-nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.tc-nav-link:hover {
  background: var(--color-border-light);
  color: var(--color-text);
  text-decoration: none;
}

.tc-nav-link.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.tc-nav-link.tc-nav-btn {
  background: var(--color-primary);
  color: white;
  padding: 8px 16px;
}

.tc-nav-link.tc-nav-btn:hover {
  background: var(--color-primary-dark);
  color: white;
}

/* Header Actions */
.tc-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tc-dark-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background var(--transition), border-color var(--transition);
}

.tc-dark-toggle:hover {
  background: var(--color-border-light);
  border-color: var(--color-primary);
}

/* Hamburger */
.tc-hamburger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg-white);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.tc-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile Nav */
.tc-mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg-white);
  z-index: 999;
  overflow-y: auto;
  padding: 20px 24px;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--color-border);
}

.tc-mobile-nav.open {
  display: flex;
}

.tc-mobile-nav .tc-nav-link {
  font-size: 16px;
  padding: 12px 16px;
  width: 100%;
}

/* ===== MAIN CONTENT ===== */
.tc-main {
  flex: 1;
}

/* ===== FOOTER ===== */
.tc-site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 60px 0 30px;
  margin-top: auto;
}

body.dark-mode .tc-site-footer {
  background: #070d18;
  border-top: 1px solid #1e3a56;
}

.tc-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.tc-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.tc-footer-brand .tc-logo-text {
  color: white;
  font-size: 22px;
}

.tc-footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  margin-top: 12px;
  max-width: 280px;
}

.tc-footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: white;
  margin-bottom: 16px;
}

.tc-footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tc-footer-col ul li a {
  font-size: 14px;
  color: #94a3b8;
  text-decoration: none;
  transition: color var(--transition);
}

.tc-footer-col ul li a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.tc-footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

.tc-footer-bottom-links {
  display: flex;
  gap: 20px;
}

.tc-footer-bottom-links a {
  color: #64748b;
  text-decoration: none;
  font-size: 13px;
  transition: color var(--transition);
}

.tc-footer-bottom-links a:hover {
  color: var(--color-primary);
}

.tc-privacy-badge-footer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
}

/* ===== BREADCRUMB ===== */
.tc-breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #94a3b8;
  flex-wrap: wrap;
}

.tc-breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.tc-breadcrumb a:hover {
  text-decoration: underline;
}

.tc-breadcrumb .bc-sep {
  color: #cbd5e1;
}

.tc-breadcrumb .bc-current {
  color: var(--color-text-muted);
  font-weight: 600;
}

/* ===== PAGE WRAPPER ===== */
.tc-page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ===== UTILITY CLASSES ===== */
.tc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
  text-decoration: none;
}

.tc-btn-primary {
  background: var(--color-primary);
  color: white;
}

.tc-btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14,165,233,0.3);
  color: white;
  text-decoration: none;
}

.tc-btn-success {
  background: var(--color-accent);
  color: white;
}

.tc-btn-success:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
  color: white;
}

.tc-btn-outline {
  background: white;
  color: var(--color-text-muted);
  border: 2px solid var(--color-border);
}

.tc-btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ===== TOAST ===== */
.tc-global-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #0f172a;
  color: white;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  pointer-events: none;
  max-width: 300px;
}

.tc-global-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .tc-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .tc-nav {
    display: none;
  }

  .tc-hamburger {
    display: flex;
  }

  .tc-footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .tc-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .tc-breadcrumb {
    padding: 12px 16px 0;
  }

  .tc-page-wrap {
    padding: 0 16px 40px;
  }
}

@media (max-width: 480px) {
  .tc-header-inner {
    padding: 0 16px;
  }

  .tc-logo-text {
    font-size: 17px;
  }
}
