/*
 * 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;
  scroll-behavior: smooth;
}

/* 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;
  }

  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;
    }
  }

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

  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;
  }

  /* 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;
    }
  }

  /* 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;
  }

  /* 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);
}

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

/* ── 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%);
  }
}
