/*
 * Marketing Page Styles
 *
 * Shared styles for all marketing pages using the static layout.
 * Visual language: hard edges, clear hierarchy, sans-serif + monospace mix.
 * Inspired by the landing page design.
 */

:root {
  color-scheme: light;
  --mk-mono: "Berkeley Mono", "JetBrains Mono", "Fira Code", ui-monospace, monospace;
}

html {
  color-scheme: light;
}

/* Eyebrow — marketing-only label that appears above hero headings.
   Visual language mirrors the landing page. Not for use in app UI. */
.eyebrow {
  font-family: var(--font-stack-monospace);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  line-height: 1;
  margin: 0;
  display: block;
}

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

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

/* Base marketing page styles */
body.marketing-page {
  font-size: 16px;
  background-color: white;
  color: black;
  color-scheme: light;

  main {
    padding: 0;
    margin: 0;
    background-color: white;
    color: black;
  }

  /* Restore padding for compact main (e.g. UI library) so content doesn’t hug the edges */
  main.compact {
    padding: calc(var(--base-spacing) * 2);
  }

  a {
    color: inherit;
  }

  html {
    scroll-behavior: smooth;
    cursor: default;
  }

  .box {
    color: black;
    border: 1px solid rgba(0,0,0,0.1);
    background: white;
  }

  .button {
    transition: all 0.1s ease-in-out !important;
    border-radius: 0 !important;

    &.is-link {
      color: black;
    }

    &.is-primary {
      background: #0a0a0a !important;
      color: #fff !important;
      border-color: #0a0a0a !important;
      border-radius: 0 !important;

      i, svg {
        color: #fff !important;
      }

      &:hover,
      &:focus {
        background: #222 !important;
        background-color: #222 !important;
        color: #fff !important;
        border-color: #222 !important;
        opacity: 1;
      }
    }
  }

  nav {
    padding: 1rem;

    a { color: black; }
  }

  header {
    text-align: center;
    min-height: calc(100vh - 200px);
    padding: 1rem;
  }

  h1 {
    font-size: 48px;
    color: black;
    font-weight: 500;
    letter-spacing: -0.025em;
  }

  h2 {
    font-size: 2rem;
    font-weight: 500;
    color: black;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }

  h3, h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: black;
  }

  h5, h6 {
    color: black;
  }

  p {
    color: black;
  }

  @media (min-width: 768px) {
    h1 { font-size: 72px; }
    h2 { font-size: 2.4rem; }
    h3, h4 { font-size: 1.4rem; }
  }

  header p {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  @media (min-width: 768px) {
    header p {
      font-size: 1.25rem;
    }
  }

  /* Sections */
  section {
    padding: 2rem 1rem;

    h1, h2, h3, h4, h5, h6, p {
      color: black !important;
    }
  }

  @media (min-width: 768px) {
    section {
      padding: 4rem 1rem;
    }
  }

  /* Features grid */
  .features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
  }

  @media (min-width: 768px) {
    .features {
      gap: 0;
      background: rgba(0,0,0,0.1);
      border: 1px solid rgba(0,0,0,0.1);
    }
  }

  .feature {
    position: relative;
    flex: 1 1 300px;
    padding: 1.5rem;
    border: 1px solid rgba(0,0,0,0.1);
    background: white;
    cursor: default;
    text-align: left;

    @media (min-width: 768px) {
      border: none;
    }

    &:focus,
    &:hover {
      border-color: rgba(0,0,0,0.2);
    }

    .button:hover,
    .button:focus {
      background: #000;
      color: #fff;
    }

    .bubble {
      pointer-events: none;
      position: absolute;
      top: -10px;
      left: -10px;
      background: black;
      color: rgba(255,255,255,0.8);
      border-radius: 100%;
      border: 1px solid rgba(0,0,0,0.1);
      width: 40px;
      height: 40px;
      min-width: 40px;
      min-height: 40px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      font-weight: 600;
      aspect-ratio: 1;

      i { color: rgba(255,255,255,0.8); }
    }
  }

  @media (min-width: 768px) {
    .feature {
      padding: 2rem;
    }
  }

  .feature h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
  }

  @media (min-width: 768px) {
    .feature h3 {
      font-size: 1.5rem;
    }
  }

  /* Gradient section */
  .gradient-bg,
  section.gradient-bg {
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0,0,0,0.08);
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }

  .gradient-bg h1,
  .gradient-bg h2,
  .gradient-bg h3,
  .gradient-bg h4,
  .gradient-bg h5,
  .gradient-bg h6,
  .gradient-bg p,
  section.gradient-bg h1,
  section.gradient-bg h2,
  section.gradient-bg h3,
  section.gradient-bg h4,
  section.gradient-bg h5,
  section.gradient-bg h6,
  section.gradient-bg p {
    color: black !important;
  }

  /* Dark section */
  .dark-section,
  section.dark-section {
    background: #000 !important;
    color: #fff !important;
  }

  .dark-section h1,
  .dark-section h2,
  .dark-section h3,
  .dark-section h4,
  .dark-section h5,
  .dark-section h6,
  .dark-section p,
  .dark-section a,
  .dark-section span,
  .dark-section div,
  .dark-section li,
  .dark-section strong,
  section.dark-section h1,
  section.dark-section h2,
  section.dark-section h3,
  section.dark-section h4,
  section.dark-section h5,
  section.dark-section h6,
  section.dark-section p,
  section.dark-section a,
  section.dark-section span,
  section.dark-section div,
  section.dark-section li,
  section.dark-section strong {
    color: white !important;
  }

  .dark-section h2,
  section.dark-section h2 {
    margin-bottom: 2.5rem !important;
  }

  .dark-section .button.is-primary {
    background: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
    border-radius: 0 !important;

    i, svg { color: #000 !important; }

    &:hover,
    &:focus {
      background: #e0e0e0 !important;
      background-color: #e0e0e0 !important;
      color: #000 !important;
      border-color: #e0e0e0 !important;
      opacity: 1;
    }
  }

  /* Dark mode code viewer sections */
  .data-viewer,
  .data-viewer * {
    color: #d4d4d4;
  }

  .user-message .message-content,
  .user-message .message-content * {
    color: white;
  }

  footer.static-footer {
    padding: 5rem 2.5rem;
  }

  .content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
  }

  .page-header {
    text-align: center;
    margin-bottom: 4rem;
  }

  .page-header h1 {
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
  }

  .page-header p {
    font-size: 1.1rem;
    color: rgba(0,0,0,0.55);
    max-width: 580px;
    text-align: center;
    margin: 0 auto;
    font-family: var(--mk-mono);
    line-height: 1.6;
  }

  .section {
    margin-bottom: 5rem;
    padding: 3rem 0;
  }

  .section-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.015em;
  }

  .feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1px;
    background: rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.1);
    margin-top: 3rem;
  }

  .feature-card {
    padding: 1.75rem;
    border: none;
    background: white;
    transition: background 0.1s ease;
    &:hover {
      background: rgba(0,0,0,0.015);
    }
  }

  .feature-icon {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
  }

  .feature-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(0,0,0,0.55);
  }

  .cta-section {
    text-align: center;
    margin-top: 4rem;
    padding: 4rem 2rem;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0,0,0,0.08);
  }

  .cta-button {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background: #000;
    color: white;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.875rem;
    transition: opacity 0.15s ease;
    &:hover {
      opacity: 0.8;
      color: white;
    }
  }

  .dark-bg {
    background: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0,0,0,0.08);
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }

  .capability-list {
    max-width: 800px;
    margin: 2rem auto;
  }

  /* Fixed CTA Button */
  .fixed-cta {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    transition: opacity 0.2s ease;

    &:hover {
      opacity: 0.85;
    }
  }

  @media (max-width: 768px) {
    .fixed-cta {
      bottom: 1rem;
      right: 1rem;
    }
  }

  .capability-item {
    display: flex;
    align-items: center;
    margin-bottom: 1px;
    padding: 1.25rem 1.5rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: background 0.1s ease;
    &:hover {
      background: rgba(0,0,0,0.015);
    }
  }

  .capability-icon {
    font-size: 1.25rem;
    margin-right: 1.25rem;
    color: #000;
    background: rgba(0, 0, 0, 0.04);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .capability-content {
    flex: 1;
  }

  .capability-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    text-align: left;
  }

  .capability-description {
    color: rgba(0, 0, 0, 0.55);
    line-height: 1.5;
    font-family: var(--mk-mono);
    font-size: 0.82rem;
    text-align: left;
  }

  /* Use case grid */
  .use-case-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.1);
    max-width: 1000px;
    margin: 3rem auto 0;
  }

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

  .use-case-card {
    padding: 1.75rem;
    background: white;
    border: none;
    text-align: left;
    transition: background 0.1s ease;

    &:hover {
      background: rgba(0,0,0,0.015);
    }
  }

  .use-case-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: #000;
  }

  .use-case-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
  }

  .use-case-card p {
    color: rgba(0, 0, 0, 0.55);
    line-height: 1.6;
    font-family: var(--mk-mono);
    font-size: 0.82rem;
  }

  /* Integration features list */
  .integration-features {
    max-width: 800px;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.1);
  }

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

  .integration-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: white;
    transition: background 0.1s ease;

    &:hover {
      background: rgba(0,0,0,0.015);
    }

    i {
      font-size: 1.25rem;
      color: #000;
      flex-shrink: 0;
    }

    span {
      font-family: var(--mk-mono);
      color: rgba(0, 0, 0, 0.7);
      font-size: 0.85rem;
      line-height: 1.5;
    }
  }

  /* Stats grid */
  .stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.1);
    max-width: 900px;
    margin: 3rem auto 0;
  }

  @media (min-width: 768px) {
    .stats-grid {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  .stat {
    text-align: center;
    background: white;
    padding: 2rem;
  }

  .stat-number {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: var(--mk-mono);
    font-weight: 600;
  }

  .stat-label {
    font-size: 0.85rem;
    color: rgba(0,0,0,0.5);
    font-family: var(--mk-mono);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.68rem;
  }

  /* Feature header */
  .feature-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
  }

  /* Feature with inline bubble */
  .feature .bubble {
    position: relative;
    top: 0;
    left: 0;
    margin-right: 1rem;
  }

  /* Scribe images */
  .scribe-image {
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    object-fit: contain;
  }

  @media (min-width: 768px) {
    .scribe-image {
      max-height: 400px;
    }
  }

  /* Animation utilities */
  .float-fast {
    animation: float 2s ease-in-out infinite;
  }

  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
  }

  /* Mobile-specific styles */
  @media (max-width: 768px) {
    h1 {
      font-size: 42px !important;
      line-height: 1.15;
    }

    h2 {
      font-size: 1.6rem !important;
      line-height: 1.3;
    }

    .flex.justify-around {
      flex-direction: column;
      gap: 2rem;
    }

    nav.tr {
      display: flex;
      padding: 0.5rem;
      gap: 0.5rem;
    }

    nav.tr .button {
      flex: 1;
      width: 100%;
      justify-content: center;
      font-size: 1rem;
      padding: 0.75rem;
    }

    .box {
      padding: 1rem;
    }
  }

  /* Blog-specific styles */
  .blog-post {
    line-height: 1.7;
    text-align: left;
    max-width: 700px;
    margin: 0 auto;
  }

  .blog-post h1 {
    text-align: left;
    margin-bottom: 2rem;
    font-size: 3rem;
    font-weight: 500;
    letter-spacing: -0.025em;
  }

  .blog-post h2 {
    font-family: var(--font-stack-sans-serif);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.5rem;
    text-align: left;
    letter-spacing: -0.01em;
  }

  .blog-post h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 1.15rem;
    text-align: left;
  }

  .blog-post p {
    margin-bottom: 1.25rem;
    line-height: 1.7;
    text-align: left;
  }

  .blog-post ul {
    margin: 1.25rem 0;
    padding-left: 2rem;
    text-align: left;
  }

  .blog-post li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    text-align: left;
  }

  .blog-post blockquote {
    border-left: 3px solid rgba(0,0,0,0.2);
    padding-left: 1.5rem;
    margin: 2rem 0;
    opacity: 0.85;
    font-style: italic;
    text-align: left;
  }

  .author-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
  }

  .author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    flex-shrink: 0;
  }

  .author-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: left;
  }

  .author-name {
    font-weight: 600;
    font-size: 1rem;
  }

  .author-title {
    opacity: 0.6;
    font-size: 0.85rem;
  }

  .post-date {
    opacity: 0.5;
    font-size: 0.8rem;
    font-family: var(--mk-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }

  .citation {
    background: rgba(0,0,0,0.03);
    border-left: 3px solid rgba(0,0,0,0.15);
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    margin: 1.5rem 0;
    line-height: 1.6;
    text-align: left;
  }

  .citation strong {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
  }

  .citation a {
    color: black;
    text-decoration: underline;
  }

  .highlight-box {
    background: rgba(0,0,0,0.03);
    border-left: 3px solid #000;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    text-align: left;
  }

  .highlight-box h3 {
    margin-top: 0;
    font-size: 1.1rem;
    font-weight: 600;
  }

  .highlight-box p:last-child {
    margin-bottom: 0;
  }

  /* Blog index page styles */
  body.static.blog_index .page-header h1 {
    text-align: center;
  }

  body.static.blog_index .page-header p {
    text-align: center;
  }

  body.static.blog_index article {
    text-align: left;
  }

  body.static.blog_index article h2 {
    text-align: left;
  }

  body.static.blog_index article p {
    text-align: left;
  }
}

.highlight {
  background-color: var(--color-highlight);
}

.highlight-slant {
  position: relative;
  display: inline-block;
  z-index: 0;
}

.highlight-slant::before {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: translateY(7%) skew(10deg) translateX(-2%) rotate(-1deg);
  background-color: yellow;
  z-index: -1;
}

@media (prefers-color-scheme: dark) {
  .highlight,
  .highlight-slant {
    color: black;
  }
}

.latest-insights-row {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
  background: rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.1);
}

.latest-insights-row::-webkit-scrollbar {
  height: 4px;
}

.latest-insights-row::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
}

.latest-insights-card {
  min-width: 260px;
  flex: 1 0 260px;
  padding: 1.25rem 1.5rem;
  border-right: 1px solid rgba(0,0,0,0.1);
  background: white;
}

.latest-insights-card:last-child {
  border-right: none;
}

@media (min-width: 960px) {
  .latest-insights-row {
    overflow-x: visible;
  }

  .latest-insights-card {
    min-width: 0;
    flex: 1 1 0;
  }
}

/* ── Shared Footer ──────────────────────────────────────────── */
.static-footer {
  padding: 5rem 2.5rem;
  background: rgba(0, 0, 0, 0.02);
}

.static-footer-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-wordmark {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0a0a0a;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.footer-wordmark .diamond { opacity: 0.5; }

.footer-copy {
  font-size: 0.75rem;
  color: rgba(10, 10, 10, 0.5);
  letter-spacing: 0.05em;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-nav-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: rgba(10, 10, 10, 0.5);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: #0a0a0a;
  text-decoration: none;
  &:hover { text-decoration: underline; }
}

@media (max-width: 600px) {
  .static-footer { padding: 3rem 1.25rem; }
  .static-footer-inner { flex-direction: column; }
}

/* ── Manifesto ──────────────────────────────────────────────── */
.manifesto-image {
  transition: filter 0.9s ease;
  filter: grayscale(100%);
  border-radius: 12px;
  &:focus,
  &:hover {
    filter: grayscale(0%);
  }
}
