@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --bg: #0A0908;
  --surface: #131210;
  --surface-2: #181614;
  --border: #242220;
  --text: #EDEAE0;
  --text-muted: #5C5850;
  --accent: #C4A25A;
  --accent-light: #D8BA7A;
  --accent-glow: rgba(196, 162, 90, 0.3);
  --success: #2A8A60;
  --danger: #A04040;
}

body {
  font-family: 'Thmanyah Sans', 'IBM Plex Sans Arabic', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

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

/* NAV */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 9, 8, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 32px;
  height: 32px;
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo-ai {
  color: var(--accent);
  margin-right: 4px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* HERO */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 680px 560px at 50% 44%, rgba(196, 162, 90, 0.15) 0%, rgba(196, 162, 90, 0.04) 38%, transparent 65%),
    radial-gradient(ellipse 80% 60% at 80% 10%, rgba(196, 162, 90, 0.055) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  max-width: 700px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 28px;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 64px;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  background: #D8BA7A;
  transform: translateY(-1px);
  box-shadow: 0 6px 32px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.btn-lg {
  padding: 18px 48px;
  font-size: 17px;
  border-radius: 14px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-light);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* FEATURES */
.features {
  padding: 120px 0;
}

.features h2,
.demo-section h2,
.contact h2 {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 56px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  transition: border-color 0.3s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--surface-2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* DEMO */
.demo-section {
  padding: 120px 0;
  background: linear-gradient(180deg, transparent 0%, rgba(196, 162, 90, 0.03) 50%, transparent 100%);
}

.demo-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 48px;
}

.demo-card {
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  transition: max-width 0.4s ease;
}

.demo-card.settings-open {
  max-width: 900px;
}

.demo-card-inner {
  display: flex;
  direction: ltr;
}

.demo-main {
  flex: 1;
  min-width: 0;
  padding: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.demo-settings {
  width: 0;
  height: 0;
  overflow: hidden;
  border-left: 0 solid var(--border);
  opacity: 0;
  transition: width 0.4s ease, height 0.4s ease, opacity 0.3s ease, border-left-width 0.4s ease;
  display: flex;
  flex-direction: column;
}

.demo-card.settings-open .demo-settings {
  width: 340px;
  height: auto;
  opacity: 1;
  border-left-width: 1px;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  direction: rtl;
}

.settings-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.settings-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  direction: rtl;
}

.demo-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.agent-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gear-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.gear-btn:hover {
  color: var(--accent-light);
  border-color: var(--accent);
}

.gear-btn.active {
  color: var(--accent-light);
  border-color: var(--accent);
  background: rgba(196, 162, 90, 0.1);
}

.agent-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.agent-name {
  font-size: 16px;
  font-weight: 600;
}

.agent-status {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.agent-status.active {
  color: var(--success);
}

.agent-status.connecting {
  color: var(--accent-light);
}

.visualizer-container {
  width: 100%;
  height: 120px;
  margin-bottom: 16px;
  display: none;
}

.visualizer-container.active {
  display: block;
}

#visualizer {
  width: 100%;
  height: 100%;
}

.transcript-area {
  width: 100%;
  min-height: 60px;
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 32px;
  padding: 16px;
  background: var(--surface-2);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.8;
}

.transcript-placeholder {
  color: var(--text-muted);
  text-align: center;
  font-size: 13px;
}

.mic-btn {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mic-btn:hover {
  background: #D8BA7A;
  transform: scale(1.05);
}

.mic-btn.active {
  background: var(--danger);
}

.mic-btn.active:hover {
  background: #B85050;
}

.mic-btn.connecting {
  background: var(--accent);
  animation: pulse-connect 1.5s infinite;
}

.mic-btn-inner {
  position: relative;
  z-index: 2;
}

.mic-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  pointer-events: none;
}

.mic-btn.active .mic-pulse {
  animation: pulse-ring 1.5s infinite;
  border-color: var(--danger);
}

.mic-label {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes pulse-connect {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* CONTACT */
.contact {
  padding: 120px 0;
  text-align: center;
}

.contact p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 40px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* FOOTER */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: color 0.2s;
}

.sidebar-close:hover {
  color: var(--text);
}

.field-group {
  margin-bottom: 24px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.voice-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.voice-option {
  cursor: pointer;
}

.voice-option input {
  display: none;
}

.voice-card {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.voice-card:hover {
  border-color: var(--accent);
}

.voice-option input:checked + .voice-card {
  border-color: var(--accent);
  background: rgba(196, 162, 90, 0.1);
}

.voice-name {
  font-size: 14px;
  font-weight: 600;
}

.voice-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.advanced-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
}

.advanced-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}

.advanced-toggle svg {
  transition: transform 0.2s;
}

.advanced-toggle.open svg {
  transform: rotate(180deg);
}

.advanced-fields {
  margin-top: 16px;
}

.field-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
  transition: border-color 0.2s;
}

.field-input:focus {
  outline: none;
  border-color: var(--accent);
}

.field-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.btn-reset {
  width: 100%;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  font-weight: 500;
}

.btn-reset:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    flex-direction: column;
    gap: 24px;
  }

  .stat-divider {
    width: 40px;
    height: 1px;
  }

  .nav-links {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .demo-card.settings-open {
    max-width: 100%;
  }

  .demo-card-inner {
    flex-direction: column;
  }

  .demo-card.settings-open .demo-settings {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .demo-settings {
    border-left: none;
    transition: width 0s, height 0.4s ease, opacity 0.3s ease;
  }
}
