/* ============================================================
   Shared marketing sections.

   Loaded by the pricing, review and integrations pages. Pages under
   /features/ use features/feature-page.css instead.
   ============================================================ */

body {
  line-height: 1.6;
  color: var(--hero-gradient-end);
}

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

/* ========================================
   Animations
   ======================================== */

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animate-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   Section Labels & Headers
   ======================================== */

.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--primary-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: var(--text-md);
  color: var(--black);
  line-height: 1.7;
}

/* ========================================
   Hero Section
   ======================================== */

/* Lit from above, the same slate as the pricing and home heroes. */
.hero {
  position: relative;
  padding: 148px 0 88px;
  text-align: center;
  background:
    radial-gradient(50% 80% at 50% 0%, rgba(120, 150, 220, 0.16), transparent 70%),
    linear-gradient(160deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
  color: var(--white);
  overflow: hidden;
}

.hero .container {
  position: relative;
  z-index: 2;
}

/* Opt-in: the page's first content block rises into the band's lower edge.
   The hero leaves room with extra bottom padding; the next section wraps its
   first block in .rise-sheet and drops its own top padding. */
.hero.hero--rise {
  padding-bottom: 216px;
}

.rise-section {
  padding-top: 0 !important;
}

.rise-sheet {
  position: relative;
  z-index: 3;
  margin-top: -128px;
  padding: 56px 56px 60px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  box-shadow: 0 32px 64px -32px var(--overlay-medium), var(--elevation-sm);
}

.rise-sheet .section-header {
  margin-bottom: 44px;
}

/* Inside the sheet the tiles drop their own box, so the sheet is the only
   card and the tiles read as a list of destinations. */
.rise-sheet .feature-card {
  border-color: transparent;
  background: transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.rise-sheet .feature-card:hover {
  border-color: var(--gray-200);
  background: var(--gray-50);
}

.hero h1 {
  font-size: var(--text-6xl);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero .hero-subtitle {
  font-size: var(--text-lg);
  color: var(--white);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   CTA Buttons (hero + footer)
   ======================================== */

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-cta-primary {
  background: var(--primary-blue);
  color: var(--white);
}

.btn-cta-primary:hover {
  background: var(--blue-700);
}

.btn-cta-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white-alpha-30);
}

.btn-cta-outline:hover {
  border-color: var(--white-alpha-60);
  background: var(--white-alpha-05);
}

.btn-cta-ghost {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white-alpha-20);
}

.btn-cta-ghost:hover {
  border-color: var(--white-alpha-40);
  color: var(--white);
}

/* ========================================
   Features Grid (Overview Page)
   ======================================== */

.features-overview {
  padding: 100px 0;
}

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

.feature-card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  transition: border-color 0.2s ease;
  text-decoration: none;
  display: block;
}

.feature-card:hover {
  border-color: var(--primary-blue);
}

/* One flat style for every tile; the color modifier classes in the markup
   are intentionally not styled. */
.feature-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: var(--blue-50);
  color: var(--primary-blue);
}

.feature-card-icon svg {
  width: 22px;
  height: 22px;
}

.feature-card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: var(--text-xs);
  color: var(--black);
  line-height: 1.6;
  margin-bottom: 12px;
}

.feature-card-link {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--primary-blue);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.feature-card-link svg {
  transition: transform 0.2s ease;
}

.feature-card:hover .feature-card-link svg {
  transform: translateX(4px);
}

/* The /features/ grid only. Twelve tiles two-across made the page mostly
   scrolling, so it goes three-across on desktop with a tighter tile. The same
   classes are used on About, Integrations and the subscription page, which
   have far fewer tiles and are left alone. */
.features-overview .features-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.features-overview .feature-card {
  padding: 18px;
}

.features-overview .feature-card-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
}

.features-overview .feature-card-icon svg {
  width: 18px;
  height: 18px;
}

.features-overview .feature-card h3 {
  font-size: var(--text-md);
  margin-bottom: 6px;
}

.features-overview .feature-card p {
  line-height: 1.55;
  margin-bottom: 10px;
}

@media (max-width: 1100px) {
  .features-overview .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .features-overview .features-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Why Argo Books Section (Overview)
   ======================================== */

.why-section {
  padding: 100px 0;
  background: var(--gray-50);
}

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

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

.why-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  background: var(--blue-50);
  color: var(--primary-blue);
}

.why-card-icon svg {
  width: 28px;
  height: 28px;
}

.why-card h3 {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.why-card p {
  font-size: var(--text-sm);
  color: var(--black);
  line-height: 1.7;
}

/* ========================================
   Feature Detail Section (Individual Pages)
   ======================================== */

.feature-detail-section {
  padding: 100px 0;
}

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

.feature-detail-text h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.feature-detail-text p {
  font-size: var(--text-sm);
  color: var(--black);
  line-height: 1.7;
  margin-bottom: 24px;
}

.feature-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: var(--text-sm);
  color: var(--black);
  padding: 8px 0;
  line-height: 1.5;
}

.feature-checklist li svg {
  color: var(--emerald-500);
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-detail-visual {
  position: relative;
  transform: scale(1.05);
}

.feature-detail-visual img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--elevation-xl);
}

/* Reversed layout (image left, text right) */

.feature-detail.reversed {
  direction: rtl;
}

.feature-detail.reversed > * {
  direction: ltr;
}

/* ========================================
   Benefits Grid Section
   ======================================== */

.benefits-section {
  padding: 100px 0;
}

/* Two columns of icon-left rows rather than a grid of floating cards.
   Paired cells share a grid row height, so the hairline dividers line up
   across both columns. */

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 56px;
  max-width: 1040px;
  margin: 0 auto;
}

.benefit-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: start;
  column-gap: 18px;
  padding: 28px 2px;
  border-bottom: 1px solid var(--gray-200);
}

/* The bottom row carries no divider. */

.benefit-card:nth-last-child(-n + 2) {
  border-bottom: none;
}

.benefit-card:hover h3 {
  color: var(--primary-blue);
}

.benefit-card-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: var(--blue-50);
  color: var(--primary-blue);
}

.benefit-card-icon svg {
  width: 22px;
  height: 22px;
}

/* One brand ink across every row. The per-card rainbow was the section's
   loudest "AI-generated" tell, so the color modifiers all resolve to it. */

.benefit-card-icon.green,
.benefit-card-icon.purple,
.benefit-card-icon.amber,
.benefit-card-icon.cyan,
.benefit-card-icon.red {
  background: var(--blue-50);
  color: var(--primary-blue);
}

.benefit-card h3 {
  grid-column: 2;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gray-900);
  margin: 1px 0 6px;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.benefit-card p {
  grid-column: 2;
  font-size: var(--text-xs);
  color: var(--gray-600);
  line-height: 1.65;
  margin: 0;
}

/* ========================================
   How It Works Section
   ======================================== */

.how-it-works {
  padding: 100px 0;
  background: var(--gray-50);
}

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

.step-card {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-round);
  background: var(--primary-blue);
  color: var(--white);
  font-size: var(--text-lg);
  font-weight: 700;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
}

.step-card h3 {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.step-card p {
  font-size: var(--text-sm);
  color: var(--black);
  line-height: 1.7;
}

/* ========================================
   CTA Section (dark background)
   ======================================== */

.dark-section-wrapper {
  position: relative;
  background: var(--hero-gradient-start);
  overflow: hidden;
}

.dark-section-wrapper .footer {
  background: transparent;
}

.cta-section {
  padding: 100px 0;
  background: transparent;
}

.cta-card {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-card h2 {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.cta-card p {
  font-size: var(--text-md);
  color: var(--white);
  margin-bottom: 32px;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

@keyframes scanSweep {
  0%   { top: 12%; opacity: 0; }
  5%   { opacity: 1; }
  70%  { opacity: 1; }
  80%  { top: 88%; opacity: 0; }
  100% { top: 88%; opacity: 0; }
}

@keyframes tagLoop {
  0%   { opacity: 0; transform: translateX(10px); }
  10%  { opacity: 1; transform: translateX(0); }
  75%  { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(10px); }
}

@keyframes boxLoop {
  0%   { opacity: 0; transform: scale(0.95); }
  10%  { opacity: 1; transform: scale(1); }
  80%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.95); }
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .why-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

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

  .feature-detail-visual {
    order: -1;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .benefit-card:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--gray-200);
  }

  .benefit-card:last-child {
    border-bottom: none;
  }

  .feature-detail.reversed {
    direction: ltr;
  }
}

@media (max-width: 900px) {
  .rise-sheet {
    padding: 44px 32px 48px;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 120px 0 60px;
  }

  .hero.hero--rise {
    padding-bottom: 132px;
  }

  .rise-sheet {
    margin-top: -84px;
    padding: 32px 20px 36px;
    border-radius: var(--radius-lg);
  }

  .rise-sheet .section-header {
    margin-bottom: 28px;
  }

  .rise-sheet .feature-card {
    padding: 20px 8px;
    border-radius: 0;
    border-width: 0 0 1px;
    border-bottom-color: var(--gray-200);
  }

  .rise-sheet .feature-card:last-child {
    border-bottom-color: transparent;
  }

  .rise-sheet .feature-card:hover {
    border-color: var(--gray-200);
    background: transparent;
  }

  .hero h1 {
    font-size: var(--text-4xl);
  }

  .hero .hero-subtitle {
    font-size: var(--text-md);
  }

  .features-overview,
  .why-section,
  .feature-detail-section,
  .how-it-works,
  .benefits-section,
  .cta-section {
    padding: 60px 0;
  }

  .section-title,
  .cta-card h2 {
    font-size: var(--text-2xl);
  }

  .section-header {
    margin-bottom: 40px;
  }

  .feature-detail-text h2 {
    font-size: var(--text-xl);
  }

  .hero-ctas,
  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-ctas .btn-cta,
  .cta-buttons .btn-cta {
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .hero h1 {
    font-size: var(--text-2xl);
  }
}
