/* ============================================
   OneShot Template — Base Styles v2
   Brand colors + font injected via CSS variables
   from brand.json at runtime
   ============================================ */

:root {
  --color-primary: #2D3561;
  --color-secondary: #C05C7E;
  --color-bg: #FAFAFA;
  --color-text: #1a1a1a;
  --color-text-muted: #666;
  --color-border: #e2e2e2;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1100px;
  --radius: 12px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

/* ==========================================
   Loading Overlay — hides placeholder flash
   ========================================== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================
   Scroll-reveal animations
   ========================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Navigation --- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.nav-brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: white;
  letter-spacing: -0.01em;
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary), var(--color-secondary) 30%) 100%);
  color: white;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
/* Subtle noise texture for depth */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 20px;
  letter-spacing: -0.025em;
}
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  opacity: 0.85;
  max-width: 600px;
  margin-bottom: 40px;
  line-height: 1.7;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: var(--font-main);
}
.btn-primary {
  background: var(--color-secondary);
  color: white;
}
.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.btn-large { padding: 16px 44px; font-size: 1.1rem; border-radius: 10px; }
.btn-ghost {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-google {
  background: white;
  color: #333;
  border: 1px solid var(--color-border);
  width: 100%;
  padding: 12px;
}
.btn-google:hover { background: #f5f5f5; }

/* --- Features --- */
.features {
  padding: 100px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.features h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 56px;
  letter-spacing: -0.02em;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.feature-card {
  padding: 32px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}
.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--color-primary);
}
.feature-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Pricing --- */
.pricing {
  padding: 80px 20px;
  text-align: center;
  background: white;
}
.pricing-card {
  max-width: 420px;
  margin: 0 auto;
  padding: 48px 40px;
  background: var(--color-bg);
  border-radius: 16px;
  border: 2px solid var(--color-border);
}
.pricing-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  font-weight: 600;
}
.pricing-amount {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 28px;
  letter-spacing: -0.03em;
}
.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 32px;
}
.pricing-features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
  color: var(--color-text-muted);
}
.pricing-features li::before {
  content: '\2713';
  color: #059669;
  font-weight: 700;
  margin-right: 10px;
}
.pricing-features li:last-child { border-bottom: none; }

/* --- Testimonial --- */
.testimonial {
  background: linear-gradient(135deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary), var(--color-secondary) 30%) 100%);
  color: white;
  padding: 100px 20px;
  text-align: center;
}
.testimonial blockquote {
  font-size: 1.35rem;
  max-width: 700px;
  margin: 0 auto 20px;
  font-style: italic;
  line-height: 1.7;
  opacity: 0.92;
}
.testimonial cite {
  font-size: 0.95rem;
  opacity: 0.7;
  font-style: normal;
}

/* --- FAQ --- */
.faq {
  padding: 100px 20px;
  max-width: 800px;
  margin: 0 auto;
}
.faq h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 20px 0;
}
.faq-item h3 {
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
}
.faq-item h3:hover { color: var(--color-secondary); }
.faq-item h3::after { content: '+'; font-size: 1.5rem; color: var(--color-text-muted); transition: transform 0.3s; }
.faq-item.open h3::after { content: '\2212'; transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  color: var(--color-text-muted);
  line-height: 1.7;
}
.faq-item.open .faq-answer { max-height: 500px; padding-top: 14px; }

/* --- Footer --- */
.site-footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.7);
  padding: 48px 20px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: white; }
.footer-copy {
  font-size: 0.8rem;
  opacity: 0.5;
}

/* --- Auth Modal --- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal {
  background: white;
  border-radius: 16px;
  padding: 36px;
  width: 90%;
  max-width: 400px;
  position: relative;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-muted);
}
.modal h2 { margin-bottom: 24px; }
.modal input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 12px;
  font-family: var(--font-main);
  transition: border-color 0.2s;
}
.modal input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45,53,97,0.1);
}
.auth-divider {
  text-align: center;
  margin: 16px 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.auth-toggle {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.auth-toggle a { color: var(--color-primary); }

/* --- Chat Widget --- */
.chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  z-index: 999;
  transition: transform 0.2s, box-shadow 0.2s;
}
.chat-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}

.chat-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  max-height: 520px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  display: none;
  flex-direction: column;
  z-index: 999;
  overflow: hidden;
  animation: chatIn 0.25s ease;
}
@keyframes chatIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-panel.open { display: flex; }
.chat-header {
  padding: 16px 20px;
  background: var(--color-primary);
  color: white;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-header button {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  min-height: 250px;
  max-height: 350px;
}
.chat-message {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 85%;
  word-wrap: break-word;
  animation: msgIn 0.2s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-user {
  background: var(--color-primary);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.chat-assistant {
  background: #f0f0f0;
  color: var(--color-text);
  border-bottom-left-radius: 4px;
}
.chat-input-area {
  display: flex;
  padding: 12px;
  border-top: 1px solid var(--color-border);
  gap: 8px;
}
.chat-input-area input {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: var(--font-main);
  transition: border-color 0.2s;
}
.chat-input-area input:focus {
  outline: none;
  border-color: var(--color-primary);
}
.chat-input-area button {
  padding: 10px 18px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-main);
  transition: opacity 0.2s;
}
.chat-input-area button:hover { opacity: 0.9; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav { padding: 16px 20px; }
  .hero { min-height: 75vh; }
  .hero-content { padding: 30px 20px; }
  .features { padding: 70px 20px; }
  .pricing { padding: 60px 20px; }
  .pricing-card { padding: 36px 24px; }
  .testimonial { padding: 70px 20px; }
  .faq { padding: 70px 20px; }
  .chat-panel { width: calc(100% - 32px); right: 16px; bottom: 88px; }
  .footer-links { gap: 16px; }
}
