/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy: #0f1b2d;
  --navy-light: #1a2744;
  --orange: #e8612d;
  --orange-hover: #d4541f;
  --light-bg: #f5f5f5;
  --white: #ffffff;
  --text-dark: #0f1b2d;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  max-width: 100%;
  display: block;
}

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

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--navy);
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.5px;
}

.nav-logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: color 0.2s;
}

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

.nav-cta {
  background: var(--orange);
  color: var(--white) !important;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s;
}

.nav-cta:hover {
  background: var(--orange-hover);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: 0.3s;
}

/* ===== HERO ===== */
.hero {
  background: var(--navy);
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  max-width: 1140px;
}

.hero-text {
  text-align: center;
  max-width: 680px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-label::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--orange);
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.6rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.12;
  margin-bottom: 24px;
}

.hero h1 em {
  color: var(--orange);
  font-style: italic;
}

.hero p {
  color: rgba(255,255,255,0.65);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.75;
  margin-bottom: 24px;
  margin-left: auto;
  margin-right: auto;
}

.hero-trust {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.trust-item {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
}

.trust-item span {
  color: var(--orange);
  font-weight: 700;
  font-size: 1rem;
  display: block;
  margin-bottom: 2px;
}

/* ===== HERO EMBEDDED CHAT ===== */
.hero-chat {
  position: relative;
  width: 100%;
  max-width: 720px;
}

.hero-chat-panel {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 500px;
}

.chat-online-dot {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.chat-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
  flex-shrink: 0;
}

.prompt-btn {
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-dark);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.prompt-btn:hover {
  background: var(--white);
  border-color: var(--orange);
  color: var(--orange);
}

.chat-prompts.hidden {
  display: none;
}

.btn-primary {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--orange-hover);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--white);
  padding: 14px 32px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-outline:hover {
  border-color: var(--white);
  color: var(--white);
}

/* ===== SERVICES ===== */
.services {
  padding: 100px 0;
  background: var(--white);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-label::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--orange);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 48px;
  max-width: 560px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--light-bg);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: var(--navy);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--orange);
}

.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ===== FIRST HOME BUYER HIGHLIGHT ===== */
.fhb {
  padding: 100px 0;
  background: var(--navy);
  color: var(--white);
}

.fhb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.fhb h2 {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  line-height: 1.2;
  margin-bottom: 20px;
}

.fhb h2 em {
  color: var(--orange);
  font-style: italic;
}

.fhb p {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.fhb-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.fhb-stat {
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.08);
}

.fhb-stat .number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--orange);
  display: block;
}

.fhb-stat .label {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ===== WHY PTF ===== */
.why-ptf {
  padding: 100px 0;
  background: var(--light-bg);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.why-card {
  background: var(--white);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--border);
}

.why-card .icon {
  width: 48px;
  height: 48px;
  background: var(--navy);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.3rem;
  color: var(--orange);
  font-weight: 700;
}

.why-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.why-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
  padding: 100px 0;
  background: var(--white);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 48px;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  background: var(--orange);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 auto 20px;
}

.step h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

/* ===== FAQ ===== */
.faq {
  padding: 100px 0;
  background: var(--light-bg);
}

.faq .container {
  max-width: 720px;
}

.faq-list {
  margin-top: 48px;
}

.faq-item {
  background: var(--white);
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 24px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--orange);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-item.active .faq-question::after {
  content: '−';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer p {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--navy);
  color: var(--white);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-brand span {
  color: var(--orange);
}

.footer-desc {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer h4 {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--orange);
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 10px;
}

.footer ul a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer ul a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
}

.footer-disclaimer {
  color: rgba(255,255,255,0.4);
  font-size: 0.78rem;
  line-height: 1.6;
}

/* ===== FLOATING CHATBOT (appears when scrolled past hero) ===== */
.chatbot-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  height: 52px;
  padding: 0 24px;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 26px;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(232, 97, 45, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s, opacity 0.3s;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  opacity: 0;
  pointer-events: none;
}

.chatbot-toggle.visible {
  opacity: 1;
  pointer-events: auto;
}

.chatbot-toggle:hover {
  transform: scale(1.08);
  background: var(--orange-hover);
}

.chatbot-panel-float {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 380px;
  height: 520px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.chatbot-panel-float.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chatbot-header {
  background: var(--navy);
  color: var(--white);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbot-avatar {
  width: 36px;
  height: 36px;
  background: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.chatbot-header-text h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.chatbot-header-text p {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
}

.chatbot-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 1.3rem;
  padding: 4px;
  transition: color 0.2s;
}

.chatbot-close:hover {
  color: var(--white);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chatbot-messages::-webkit-scrollbar {
  width: 4px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.message.bot {
  background: var(--light-bg);
  color: var(--text-dark);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.message.user {
  background: var(--navy);
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.typing-indicator {
  align-self: flex-start;
  padding: 12px 16px;
  background: var(--light-bg);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  display: none;
}

.typing-indicator.visible {
  display: flex;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  margin: 0 2px;
  animation: typing 1.2s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator 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); }
}

.chatbot-input {
  display: flex;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  gap: 8px;
  flex-shrink: 0;
}

.chatbot-input input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.chatbot-input input:focus {
  border-color: var(--orange);
}

.chatbot-input button {
  width: 40px;
  height: 40px;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.chatbot-input button:hover {
  background: var(--orange-hover);
}

.chatbot-input button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .services-grid,
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: 100px 0 60px;
    min-height: auto;
  }

  .hero-grid {
    gap: 32px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-chat {
    max-width: 100%;
  }

  .hero-chat-panel {
    height: 460px;
  }

  .services-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }

  .fhb-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Floating chatbot full-width on mobile */
  .chatbot-panel-float {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .chatbot-toggle.visible {
    bottom: 16px;
    right: 16px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .fhb h2 {
    font-size: 1.8rem;
  }
}
