/* ===========================
   HISTIQ LANDING — style.css
   =========================== */

:root {
  --bg: #0a0a0f;
  --bg2: #12121a;
  --bg3: #1a1a26;
  --border: rgba(255,255,255,0.08);
  --text: #e8e8f0;
  --text-muted: #8888a8;
  --accent: #7c5af0;
  --accent-light: #9b7ff4;
  --accent-glow: rgba(124,90,240,0.25);
  --green: #22c55e;
  --radius: 14px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.18s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 24px;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.btn-sm { padding: 8px 18px; font-size: 14px; }
.btn-lg { padding: 15px 32px; font-size: 16px; }
.btn-full { width: 100%; margin-top: 24px; }

/* ---- BADGE ---- */
.badge {
  display: inline-block;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.badge-green { border-color: rgba(34,197,94,0.3); color: var(--green); background: rgba(34,197,94,0.07); }

/* ---- SECTION TITLES ---- */
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.2;
}

/* ===========================
   NAV
   =========================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(10,10,15,0.85);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}
.nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

/* ===========================
   HERO
   =========================== */
.hero {
  padding: 140px 0 80px;
  text-align: center;
}

.hero-title {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-light) 0%, #c084fc 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.cta-note {
  font-size: 13px;
  color: var(--text-muted);
}

.hero-browsers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 60px;
}
.hero-browsers img {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

/* MOCKUP */
.mockup {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
  text-align: left;
}
.mockup-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.dot {
  width: 11px; height: 11px;
  border-radius: 50%;
}
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }
.mockup-url {
  margin-left: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.mockup-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 14px;
}
.chat-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 10px;
  line-height: 1.6;
}
.chat-msg.user {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}
.chat-msg.ai {
  background: var(--bg3);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.ai-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.chat-msg.ai ul {
  margin: 8px 0 8px 16px;
  color: var(--accent-light);
}
.chat-msg.ai a { color: var(--accent-light); text-decoration: underline; }
.chat-typing {
  display: flex;
  gap: 5px;
  padding: 14px 18px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  border-bottom-left-radius: 3px;
  align-self: flex-start;
  width: 60px;
}
.chat-typing span {
  width: 7px; height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

/* ===========================
   PROBLEM
   =========================== */
.problem {
  padding: 60px 0;
  border-top: 1px solid var(--border);
}
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.problem-item {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.problem-item.bad { background: rgba(255,255,255,0.02); }
.problem-item.good {
  background: rgba(124,90,240,0.08);
  border-color: rgba(124,90,240,0.3);
}
.problem-icon { font-size: 24px; }

/* ===========================
   FEATURES
   =========================== */
.features {
  padding: 100px 0;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 60px;
}
.feature-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: rgba(124,90,240,0.4);
  transform: translateY(-3px);
}
.feature-icon {
  font-size: 32px;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===========================
   HOW IT WORKS
   =========================== */
.how {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-top: 60px;
  flex-wrap: wrap;
}
.step {
  flex: 1;
  min-width: 200px;
  max-width: 260px;
  text-align: center;
  padding: 0 16px;
}
.step-num {
  width: 48px; height: 48px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  margin: 0 auto 16px;
}
.step h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.step p {
  font-size: 14px;
  color: var(--text-muted);
}
.step-arrow {
  font-size: 24px;
  color: var(--text-muted);
  padding-top: 14px;
  flex-shrink: 0;
}

/* ===========================
   PRIVACY
   =========================== */
.privacy-section {
  padding: 100px 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.privacy-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.privacy-text h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  margin: 16px 0 28px;
}
.privacy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.privacy-list li {
  font-size: 15px;
  color: var(--text-muted);
}
.privacy-list li::first-letter { color: var(--green); }
.privacy-quote {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.privacy-quote blockquote {
  font-size: 18px;
  line-height: 1.6;
  font-style: italic;
  color: var(--text);
  margin-bottom: 16px;
}
.privacy-quote cite {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===========================
   PRICING
   =========================== */
.pricing {
  padding: 100px 0;
}
.pricing-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 60px;
  line-height: 1.7;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  align-items: start;
}
.pricing-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
}
.pricing-featured {
  border-color: var(--accent);
  background: rgba(124,90,240,0.06);
  transform: scale(1.03);
  box-shadow: 0 0 40px var(--accent-glow);
}
.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 100px;
  white-space: nowrap;
}
.plan-badge-gold { background: linear-gradient(135deg, #b45309, #d97706); }
.plan-name {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.plan-price {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}
.plan-period {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
}
.plan-billed {
  font-size: 13px;
  color: var(--green);
  margin-bottom: 12px;
}
.plan-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.plan-features li {
  font-size: 14px;
  color: var(--text-muted);
}
.pricing-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 40px;
  line-height: 1.8;
}

/* =====================================================
   LEGAL PAGES (terms / privacy / refund)
   ===================================================== */
.legal-page {
  padding: 80px 0 120px;
}
.legal-page .legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 48px;
  transition: color 0.15s;
}
.legal-page .legal-back:hover { color: var(--text); }
.legal-page .legal-back::before { content: '←'; }

.legal-header {
  margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.legal-header .legal-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: rgba(124,90,240,0.12);
  border: 1px solid rgba(124,90,240,0.25);
  border-radius: 6px;
  padding: 4px 12px;
  margin-bottom: 20px;
}
.legal-header h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin: 0 0 16px;
}
.legal-header .legal-meta {
  font-size: 14px;
  color: var(--text-muted);
}
.legal-header .legal-meta strong {
  color: var(--text);
}

/* Content typography */
.legal-content {
  max-width: 760px;
}
.legal-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 8px;
}
.legal-content p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0 0 16px;
}
.legal-content ul, .legal-content ol {
  padding-left: 20px;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-content li {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}
.legal-content a {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-content a:hover { color: var(--text); }
.legal-content strong { color: var(--text); }
.legal-content .legal-highlight {
  background: rgba(124,90,240,0.08);
  border: 1px solid rgba(124,90,240,0.2);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 24px 0;
}
.legal-content .legal-highlight p { margin: 0; }

/* TOC sidebar (optional, hidden on mobile) */
.legal-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 64px;
  align-items: start;
}
.legal-toc {
  position: sticky;
  top: 88px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.legal-toc h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.legal-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.legal-toc ol a {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  padding: 5px 8px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s;
  line-height: 1.4;
}
.legal-toc ol a:hover {
  background: var(--bg3);
  color: var(--text);
}
@media (max-width: 860px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }
  .legal-toc { display: none; }
}

/* ===========================
   FAQ
   =========================== */
.faq {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}
.faq-list {
  max-width: 720px;
  margin: 60px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font);
  text-align: left;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q::after {
  content: '+';
  font-size: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  display: none;
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}
.faq-item.open .faq-a { display: block; }

/* ===========================
   FOOTER CTA
   =========================== */
.footer-cta {
  padding: 100px 0;
  text-align: center;
  background: radial-gradient(ellipse 60% 50% at 50% 100%, var(--accent-glow), transparent);
}
.footer-cta h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  margin-bottom: 16px;
}
.footer-cta p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 32px;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.6;
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

/* ---- Pricing 2-column ---- */
.pricing-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 760px;
  margin: 0 auto;
}
.plan-under-btn {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}

/* ---- Trial timeline ---- */
.pricing-trial-note {
  max-width: 760px;
  margin: 48px auto 0;
}
.trial-timeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 24px;
}
.trial-point {
  flex: 1;
  text-align: center;
  padding: 0 12px;
}
.trial-point-cta .trial-day {
  background: var(--accent);
  color: #fff;
}
.trial-day {
  display: inline-block;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.trial-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.trial-line {
  flex-shrink: 0;
  width: 32px;
  height: 1px;
  background: var(--border);
  margin-top: 18px;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 100px 0 60px; }
  .privacy-inner { grid-template-columns: 1fr; gap: 32px; }
  .step-arrow { display: none; }
  .steps { gap: 24px; }
  .pricing-featured { transform: none; }
  .pricing-grid-2 { grid-template-columns: 1fr; }
  .trial-timeline { flex-direction: column; align-items: center; gap: 16px; }
  .trial-line { width: 1px; height: 24px; margin: 0; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero-title { letter-spacing: -0.5px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
}
