/* perplexity-optimization.css
 * Perplexity GEO Optimization Service — AIPO GEO (English)
 * Color: Pure white / off-white base + dark gray text + warm accent
 * CTA: #991B2D (AIPO brand red)
 * Font: Inter (English)
 * Perplexity brand: black & white geometric star logo
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap');

:root {
  /* Perplexity black & white brand */
  --pplx-black: #0A0A0A;
  --pplx-dark: #1A1A1A;
  --pplx-mid: #3A3A3A;

  /* Warm accent (muted, not saturated) */
  --accent: #8B6F5E;
  --accent-light: #F5EFE9;
  --accent-mid: #D4B8A8;

  /* AIPO brand red */
  --aipo-red: #991B2D;
  --aipo-red-dark: #7A1524;
  --aipo-red-light: #FDF2F3;

  /* Text colors */
  --text-primary: #1A1A1A;
  --text-secondary: #555555;
  --text-muted: #999999;

  /* Backgrounds */
  --bg-white: #FFFFFF;
  --bg-light: #F9F9F8;
  --bg-section: #F4F4F2;
  --bg-dark: #0A0A0A;

  /* Borders */
  --border: #E8E8E5;
  --border-dark: #D0D0CC;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.09);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
}

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

/* ══════════════════════════════════════
   Buttons
══════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--aipo-red);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(153,27,45,0.22);
}
.btn-primary:hover {
  background: var(--aipo-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(153,27,45,0.32);
}
.btn-primary:active { transform: scale(0.97); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-dark);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn-secondary:hover {
  border-color: var(--text-primary);
  transform: translateY(-1px);
}

/* ══════════════════════════════════════
   Hero Banner
══════════════════════════════════════ */
.pplx-hero {
  background: var(--bg-light);
  padding: 80px 24px 72px;
  overflow: hidden;
}
.pplx-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.pplx-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-white);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.pplx-hero-badge img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 3px;
}
.pplx-hero h1 {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.pplx-hero h1 em {
  font-style: normal;
  color: var(--aipo-red);
}
.pplx-hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 28px;
  max-width: 480px;
}
.pplx-hero-features {
  list-style: none;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pplx-hero-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
}
.pplx-hero-features li::before {
  content: '';
  width: 20px;
  height: 20px;
  background: var(--pplx-dark);
  border-radius: 50%;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-size: cover;
}
.pplx-hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hero right — chat widget */
.pplx-hero-chat-col {
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pplx-chat-widget {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--border);
}
.pplx-chat-header {
  background: var(--pplx-black);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pplx-chat-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
}
.pplx-chat-header-text h3 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.pplx-chat-header-text p {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}
.pplx-chat-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
}
.pplx-chat-user {
  align-self: flex-end;
  background: var(--pplx-dark);
  color: #fff;
  padding: 12px 16px;
  border-radius: 16px 16px 4px 16px;
  font-size: 14px;
  font-weight: 500;
  max-width: 80%;
  line-height: 1.5;
}
.pplx-chat-ai {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.pplx-chat-ai-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pplx-black);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.pplx-chat-ai-avatar img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.pplx-chat-ai-bubble {
  background: var(--bg-section);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 4px 16px 16px 16px;
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.6;
  flex: 1;
}
.pplx-chat-sources {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.pplx-chat-source-tag {
  font-size: 11px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 12px;
}
.pplx-chat-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px 0;
}
.pplx-chat-typing span {
  width: 7px;
  height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.2s infinite;
}
.pplx-chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.pplx-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(-3px); }
}

/* ══════════════════════════════════════
   Stats Band
══════════════════════════════════════ */
.pplx-stats {
  background: var(--bg-dark);
  padding: 40px 24px;
}
.pplx-stats-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.pplx-stat-item {
  text-align: center;
  padding: 16px 24px;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.pplx-stat-item:last-child { border-right: none; }
.pplx-stat-num {
  font-size: 36px;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 6px;
}
.pplx-stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
}

/* ══════════════════════════════════════
   Section headings
══════════════════════════════════════ */
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--aipo-red);
  margin-bottom: 12px;
}
.section-title {
  font-size: 34px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 640px;
}

/* ══════════════════════════════════════
   Definition Section (left-aligned table)
══════════════════════════════════════ */
.pplx-definition {
  padding: 88px 24px;
  background: var(--bg-white);
}
.pplx-definition-header { margin-bottom: 48px; }
.pplx-definition-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: stretch;
}
.compare-table-wrap {
  overflow-x: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  flex: 1;
}
.compare-table thead tr { background: var(--pplx-dark); }
.compare-table thead th {
  padding: 14px 18px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
}
.compare-table thead th:last-child { color: #fff; }
.compare-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.compare-table tbody tr:hover { background: var(--bg-light); }
.compare-table td {
  padding: 18px 18px;
  vertical-align: top;
  color: var(--text-secondary);
}
.compare-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
  white-space: nowrap;
}
.compare-table td:last-child {
  font-weight: 600;
  color: var(--text-primary);
}
.def-boxes {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.def-box {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  border-left: 4px solid var(--pplx-dark);
  transition: box-shadow 0.2s;
}
.def-box:hover { box-shadow: var(--shadow-md); }
.def-box h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.def-box p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ══════════════════════════════════════
   Core Services
══════════════════════════════════════ */
.pplx-services {
  padding: 88px 24px;
  background: var(--bg-section);
}
.pplx-services-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  margin-top: 48px;
}
.pplx-services-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.service-item {
  display: flex;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}
.service-item:first-child { padding-top: 0; }
.service-item:last-child { border-bottom: none; }
.service-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  transition: background 0.2s, border-color 0.2s;
}
.service-item:hover .service-icon {
  background: var(--pplx-dark);
  border-color: var(--pplx-dark);
}
.service-content h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.service-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-white);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 10px;
}
.service-content p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.pplx-services-image { position: relative; }
.pplx-services-image .sticky-img-wrap {
  position: sticky;
  top: 80px;
}
.pplx-services-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
  border: 1px solid var(--border);
}

/* ══════════════════════════════════════
   Service Process (top cards + bottom image)
══════════════════════════════════════ */
.pplx-process {
  padding: 88px 24px;
  background: var(--bg-white);
}
.pplx-process-header { margin-bottom: 48px; }
.pplx-process-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}
.process-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
}
.process-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.process-card-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pplx-dark);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.process-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}
.process-card p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.process-card:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--aipo-red);
  font-weight: 700;
  z-index: 1;
}
.pplx-process-image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.pplx-process-image-wrap img {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 16/7;
}

/* ══════════════════════════════════════
   Why Us
══════════════════════════════════════ */
.pplx-whyus {
  padding: 88px 24px;
  background: var(--bg-section);
}
.pplx-whyus-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: stretch;
  margin-top: 48px;
}
.pplx-whyus-image {
  display: flex;
  align-items: stretch;
}
.pplx-whyus-image img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
  object-position: center;
  border: 1px solid var(--border);
  background: var(--bg-white);
  padding: 12px;
}
.pplx-whyus-points {
  display: flex;
  flex-direction: column;
  gap: 28px;
  justify-content: center;
}
.whyus-point {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.whyus-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.whyus-point h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.whyus-point p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ══════════════════════════════════════
   FAQ Section (50/50 grid, inline CTA)
══════════════════════════════════════ */
.pplx-faq {
  padding: 88px 24px;
  background: var(--bg-white);
}
.pplx-faq-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  margin-top: 48px;
}
.pplx-faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.faq-item {
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  cursor: pointer;
  gap: 16px;
}
.faq-question h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  transition: color 0.2s;
}
.faq-question:hover h4 { color: var(--aipo-red); }
.faq-toggle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-section);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  color: var(--text-secondary);
  transition: background 0.2s, transform 0.3s;
  line-height: 1;
}
.faq-item.open .faq-toggle {
  background: var(--pplx-dark);
  color: #fff;
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.23, 1, 0.32, 1), padding 0.3s;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: 20px;
}
.faq-answer p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* FAQ right: image + inline CTA */
.pplx-faq-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 80px;
}
.pplx-faq-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.pplx-faq-image img {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 1/1;
}
.pplx-faq-cta-inline {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.pplx-faq-cta-inline-text h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.pplx-faq-cta-inline-text p {
  font-size: 12px;
  color: var(--text-muted);
}
.pplx-faq-cta-inline .btn-primary {
  font-size: 13px;
  padding: 10px 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ══════════════════════════════════════
   Bottom CTA Band
══════════════════════════════════════ */
.pplx-cta-band {
  padding: 80px 24px;
  background: var(--bg-light);
  border-top: 1px solid var(--border);
  text-align: center;
}
.pplx-cta-band h2 {
  font-size: 32px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}
.pplx-cta-band p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.pplx-cta-band .btn-primary {
  font-size: 16px;
  padding: 15px 36px;
}
.pplx-cta-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ══════════════════════════════════════
   Responsive
══════════════════════════════════════ */
@media (max-width: 1024px) {
  .pplx-process-cards { grid-template-columns: repeat(3, 1fr); }
  .process-card:nth-child(3)::after { display: none; }
}
@media (max-width: 900px) {
  .pplx-hero-inner,
  .pplx-definition-layout,
  .pplx-services-layout,
  .pplx-whyus-layout,
  .pplx-faq-layout { grid-template-columns: 1fr; gap: 40px; }
  .pplx-hero h1 { font-size: 32px; }
  .section-title { font-size: 26px; }
  .pplx-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pplx-services-image .sticky-img-wrap,
  .pplx-faq-right { position: static; }
  .pplx-process-cards { grid-template-columns: repeat(2, 1fr); }
  .process-card:nth-child(2)::after { display: none; }
  .process-card:nth-child(4)::after { display: none; }
}
@media (max-width: 480px) {
  .pplx-hero { padding: 48px 16px; }
  .pplx-hero h1 { font-size: 26px; }
  .pplx-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pplx-process-cards { grid-template-columns: 1fr; }
  .process-card::after { display: none !important; }
  .pplx-faq-cta-inline { flex-direction: column; align-items: flex-start; }
}


/* ------------------------------------------------------------
   以下自 perplexity-optimization.html 的内联 <style> 外移
   ------------------------------------------------------------ */
/* 布局顶部固定导航条 (#navbar) 浮于内容之上，给首屏额外留出顶部间距，避免遮挡 hero 内容 */
.pplx-hero { padding-top: 140px; }
@media (max-width: 768px) { .pplx-hero { padding-top: 112px; } }

/* 布局的一级导航链接带 .text-white，但导航条底色是白色 */
#navbar .text-white { color: #000000; }
#navbar a.bg-primary { color: #ffffff !important; }
