/* ============================================
   LAYOUT — Landing Page & Chat App Structure
   ============================================ */

/* ---- Landing Page ---- */
.landing-page {
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

.bg-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 100% 55% at 50% -10%, rgba(249,115,22,0.08) 0%, transparent 65%),
    radial-gradient(ellipse 55% 40% at 88% 88%, rgba(251,191,36,0.05) 0%, transparent 55%),
    radial-gradient(ellipse 45% 35% at 8% 72%, rgba(34,197,94,0.025) 0%, transparent 50%);
  animation: ambientShift 24s ease-in-out infinite alternate;
}

@keyframes ambientShift {
  0%   { opacity: 0.7; }
  50%  { opacity: 1; }
  100% { opacity: 0.7; }
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 5%;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(10,10,15,0.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-slow), box-shadow var(--t-slow);
}

[data-theme="light"] .navbar {
  background: rgba(244,244,248,0.80);
}

.navbar.scrolled {
  background: rgba(10,10,15,0.96);
  box-shadow: 0 1px 0 var(--border), var(--shadow-md);
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(244,244,248,0.98);
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon { font-size: 22px; }

.logo-text {
  font-size: 18px;
  font-weight: 700;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  transition: color var(--t-base), background var(--t-base);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: var(--sp-2);
  border-radius: var(--r-md);
  transition: background var(--t-base);
}

.menu-toggle:hover { background: var(--surface-2); }

/* Hero */
.hero {
  min-height: 100vh;
  padding: 120px 5% 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hero-glow {
  position: absolute;
  top: 20%; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(249,115,22,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 760px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-6);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-full);
  padding: var(--sp-2) var(--sp-4);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}

.flag-strip {
  display: inline-block;
  width: 18px; height: 10px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--saffron) 33%, #fff 33%, #fff 66%, var(--india-green) 66%);
  flex-shrink: 0;
}

.hero-logo {
  width: 88px; height: 88px;
  background: var(--surface);
  border: 1px solid var(--border-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  box-shadow: 0 0 0 1px var(--border), 0 0 60px rgba(249,115,22,0.15), var(--shadow-lg);
  animation: heroFloat 5s ease-in-out infinite;
  position: relative;
}

.hero-logo::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(249,115,22,0.12);
  animation: ringPulse 3s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%       { transform: scale(1.1); opacity: 0.15; }
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.hero h1 {
  font-size: clamp(36px, 6vw, 66px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--text);
}

.hero-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-2);
  max-width: 560px;
  line-height: 1.75;
}

.hero-input-wrap {
  width: 100%;
  max-width: 680px;
}

.hero-note {
  font-size: 12px;
  color: var(--text-3);
}

.hero-note a {
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--t-base);
}

.hero-note a:hover { color: var(--primary); }

/* Features Section */
.features-section {
  padding: 100px 5%;
  position: relative;
  z-index: 1;
}

.section-container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text);
  text-align: center;
  margin-bottom: var(--sp-3);
}

.section-title.left { text-align: left; }

.section-subtitle {
  font-size: 16px;
  color: var(--text-2);
  text-align: center;
  margin-bottom: var(--sp-12);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}

/* About Section */
.about-section {
  padding: 100px 5%;
  background: var(--bg-2);
  position: relative;
  z-index: 1;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-16);
  align-items: center;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.about-text p {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.8;
}

.about-text strong { color: var(--text); font-weight: 600; }

.about-visual { flex-shrink: 0; }

.about-orb {
  width: 180px; height: 180px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  box-shadow: 0 0 60px rgba(249,115,22,0.08), var(--shadow-xl);
  animation: heroFloat 6s ease-in-out infinite;
}

/* Landing Footer */
.landing-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 60px 5% 32px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-10);
  padding-bottom: var(--sp-10);
  border-bottom: 1px solid var(--border);
}

.footer-brand .logo { margin-bottom: var(--sp-4); }

.footer-brand p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 280px;
}

.footer-links-group h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
  margin-bottom: var(--sp-4);
}

.footer-links-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer-links-group a,
.footer-links-group .link-btn {
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: color var(--t-base);
}

.footer-links-group a:hover,
.footer-links-group .link-btn:hover { color: var(--primary); }

.footer-bottom {
  max-width: 1100px;
  margin: var(--sp-8) auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-3);
}

.footer-bottom a {
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--t-base);
}

.footer-bottom a:hover { color: var(--primary); }

.made-in-india {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  color: var(--text-3);
}

/* ============================================
   CHAT APP LAYOUT
   ============================================ */

.chat-app {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  height: 100%;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform var(--t-slow);
  z-index: 50;
  overflow: hidden;
  position: relative;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 180px;
  background: radial-gradient(ellipse at 50% 0%, rgba(249,115,22,0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 49;
  backdrop-filter: blur(2px);
}

.sidebar-header {
  height: var(--header-h);
  padding: 0 var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.sidebar-logo span:first-child { font-size: 18px; }

.sidebar-footer {
  padding: var(--sp-3);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  flex-shrink: 0;
}

/* Chat Main */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  position: relative;
}

/* Chat Header */
.chat-header {
  height: var(--header-h);
  padding: 0 var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,15,0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  flex-shrink: 0;
  z-index: 10;
}

[data-theme="light"] .chat-header {
  background: rgba(244,244,248,0.92);
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
  flex: 1;
}

.chat-header-center { flex-shrink: 0; }

.chat-header-right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.chat-title-wrap {
  min-width: 0;
  overflow: hidden;
}

.chat-current-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* Messages Area */
.messages-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--sp-6) var(--sp-4) var(--sp-4);
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

/* Input Area */
.input-area {
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  border-top: 1px solid var(--border);
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  flex-shrink: 0;
}

[data-theme="light"] .input-area {
  background: rgba(244,244,248,0.96);
}

.input-wrap {
  max-width: var(--input-max-w);
  margin: 0 auto;
}

.input-hint {
  font-size: 11px;
  color: var(--text-3);
  text-align: center;
  margin-top: var(--sp-2);
  line-height: 1.5;
}

/* Scroll to bottom button */
.scroll-bottom-btn {
  position: absolute;
  bottom: 110px;
  right: 20px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
}

.scroll-bottom-btn:hover {
  background: var(--surface-4);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
