/* ============================================
   NOMYO -- E2EE Landing Page
   Component styles that extend the shared
   nomyo design system (css/style.css).

   Everything here is built on the same CSS
   variables, radii, borders and transitions as
   the main site, so the two stay in sync.
   ============================================ */

/* --- Hero (compact variant) ---
   The shared .hero is a full-viewport split layout; this page carries a
   second column (the code sample) and so needs a shorter hero.
   The headline here is longer than the main site's, so the columns are
   asymmetric and the title scale is tightened to keep it on two lines. */
.hero-compact {
  min-height: auto;
  padding: 160px 0 100px;
}

.hero-compact .container {
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.hero-compact .hero-title {
  font-size: clamp(2.4rem, 4.4vw, 3.75rem);
}

.hero-compact .hero-description strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* The badge is a flex row; without wrapping its text would set the
   column's min-content width and push the hero wider than the
   viewport on narrow screens. */
.hero-compact .hero-badge {
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

/* --- Section rhythm ---
   Alternating background bands, matching the main site's cadence.
   Named by surface, not by theme, so they read correctly in both
   the dark and the light palette. */
.section-primary {
  background: var(--bg-primary);
}

.section-secondary {
  background: var(--bg-secondary);
}

/* --- Code Card (hero visual) --- */
.code-card {
  width: 100%;
  max-width: 420px;
  min-width: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.code-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.code-card-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green { background: #28c840; }

.code-file {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.code-block {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text-secondary);
  /* A <pre> keeps its content's min-content width, which would push the
     whole hero grid wider than the viewport. min-width:0 lets the
     horizontal scroll do its job inside the card instead. */
  min-width: 0;
  max-width: 100%;
}

.code-block code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.tok-key { color: #a78bfa; }
.tok-str { color: #4ade80; }
.tok-num { color: #fb923c; }
.tok-com { color: var(--text-muted); }

[data-theme="light"] .code-card {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .code-dot.red { background: #e0524a; }
[data-theme="light"] .code-dot.yellow { background: #d9a017; }
[data-theme="light"] .code-dot.green { background: #1f9d3a; }

[data-theme="light"] .tok-key { color: #6d28d9; }
[data-theme="light"] .tok-str { color: #15803d; }
[data-theme="light"] .tok-num { color: #c2410c; }

/* --- Trust Strip (industries) --- */
.trust-strip {
  padding: 56px 0;
  border-bottom: 1px solid var(--border-color);
}

.trust-title {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 32px;
}

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

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  transition: all var(--transition);
}

.trust-item:hover {
  transform: translateY(-3px);
}

.trust-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-subtle);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 12px;
}

.trust-icon svg {
  width: 22px;
  height: 22px;
  color: var(--accent-blue);
}

.trust-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* --- Check List (security points) --- */
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-list li {
  position: relative;
  padding: 14px 0 14px 32px;
  border-bottom: 1px solid var(--border-color);
}

.check-list li:last-child {
  border-bottom: none;
}

.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2300ff88'%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-repeat: no-repeat;
  background-size: contain;
}

.check-list h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.check-list p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.check-list code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--accent-blue);
}

/* --- Figure Card (encryption flow diagram) --- */
.figure-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all var(--transition);
}

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

.figure-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 14px;
}

.figure-bar-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.figure-frame {
  background: #ffffff;
  border-radius: var(--radius);
  overflow: hidden;
  line-height: 0;
}

.figure-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* --- Model Card variants --- */
.model-header {
  flex-wrap: wrap;
}

.model-badge.badge-purple {
  background: rgba(123, 47, 247, 0.12);
  border-color: rgba(123, 47, 247, 0.25);
  color: #a78bfa;
}

.model-badge.badge-pink {
  background: rgba(200, 64, 233, 0.12);
  border-color: rgba(200, 64, 233, 0.25);
  color: #e879f9;
}

.model-badge.badge-green {
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.2);
  color: #00ff88;
}

.model-badge.badge-amber {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

[data-theme="light"] .model-badge.badge-purple { color: #6a1fe0; }
[data-theme="light"] .model-badge.badge-pink { color: #b030d0; }
[data-theme="light"] .model-badge.badge-green { color: #0f9d58; }
[data-theme="light"] .model-badge.badge-amber { color: #b45309; }

/* --- Pricing --- */
.pricing-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 780px;
}

.pricing-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: -8px;
  margin-bottom: 20px;
}

.pricing-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 32px;
  line-height: 1.7;
}

.pricing-note a {
  color: var(--text-secondary);
  text-decoration: underline;
}

.pricing-note a:hover {
  color: var(--accent-blue);
}

/* --- CTA actions --- */
.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* The main site's CTA section is a single centered button; this page
   pairs it with the install command. */
.cta-section .code-inline {
  border-radius: 10px;
}

/* --- Inline command chip --- */
.code-inline {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px 32px;
}

/* --- Footer --- */
.footer-grid-4 {
  grid-template-columns: 2fr 1fr 1fr 1fr;
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-disclaimer a {
  color: var(--text-secondary);
  text-decoration: underline;
}

.footer-disclaimer a:hover {
  color: var(--accent-blue);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  /* The main site stacks .hero .container and centres it below
     1024px. These rules re-apply that for the compact variant
     (same specificity as the shared rule, but loaded later). */
  .hero-compact .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-compact .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-compact .hero-cta {
    justify-content: center;
  }

  .hero-compact .hero-models {
    justify-content: center;
  }

  .hero-compact {
    padding: 130px 0 80px;
  }

  /* The main site hides .hero-visual below 1024px; this page keeps the
     code card visible because it carries the product demo. */
  .hero-visual {
    display: flex;
    justify-content: center;
    margin-top: 48px;
    min-width: 0;
  }

  .code-card {
    max-width: 460px;
  }

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

  .pricing-grid-2 {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
}

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

  .footer-grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .code-block {
    font-size: 0.72rem;
    padding: 16px;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid-4 {
    grid-template-columns: 1fr;
  }
}
