/* Sam Syntax — design aligned with Quickfields reference */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500;600&display=swap');

:root {
  --ink: #171522;
  --indigo: #2D2A4A;
  --indigo-deep: #211f38;
  --orange: #F97316;
  --purple: #7B5EA7;
  --black: #14141A;
  --sand: #E8DFCC;
  --sage: #A9BFA0;
  --lime: #C7F26B;
  --cream: #FBF9F4;
  --line: #E3DDCE;
  --muted: #514e5c;
  --white: #ffffff;
  --danger: #c14;
  --max-width: 1120px;
  --header-height: 88px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --radius: 18px;
  --radius-pill: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.15s ease;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 249, 244, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 24px;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.site-logo:hover {
  opacity: 0.85;
}

.site-logo img {
  height: 64px;
  width: auto;
  max-width: min(320px, 52vw);
  display: block;
  object-fit: contain;
  object-position: left center;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}

.site-nav a {
  opacity: 0.7;
  padding: 0;
}

.site-nav a:hover,
.site-nav a.is-active {
  opacity: 1;
}

.site-nav .nav-cta {
  opacity: 1;
  background: var(--ink);
  color: var(--cream);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 13px;
}

.site-nav .nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px -8px rgba(20, 20, 26, 0.4);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

/* Main */
main {
  flex: 1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section--sand {
  background: var(--sand);
}

.section--featured {
  background: linear-gradient(180deg, var(--cream) 0%, var(--sand) 100%);
}

/* Featured plugin showcase */
.featured-plugin {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 30px 60px -30px rgba(20, 20, 26, 0.15);
}

@media (max-width: 820px) {
  .featured-plugin {
    grid-template-columns: 1fr;
    padding: 28px;
  }
}

.featured-plugin__badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  background: rgba(249, 115, 22, 0.1);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.featured-plugin__title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 400;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.featured-plugin__title span {
  color: var(--orange);
}

.featured-plugin__tagline {
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 20px;
}

.featured-plugin__features {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.featured-plugin__features li {
  font-size: 14.5px;
  color: var(--ink);
  padding-left: 1.5rem;
  position: relative;
}

.featured-plugin__features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--sage);
  font-weight: 700;
}

.featured-plugin__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.featured-plugin__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 16px;
}

.featured-plugin__visual {
  background: var(--indigo-deep);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.featured-plugin__visual-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.2);
}

.featured-plugin__visual-tab {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #cfcbe6;
  padding: 6px 12px;
  border-radius: 6px 6px 0 0;
  opacity: 0.6;
}

.featured-plugin__visual-tab.active {
  background: #fff;
  color: var(--ink);
  opacity: 1;
}

.featured-plugin__visual-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  background: #fff;
  font-size: 12px;
}

.featured-plugin__visual-cell {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.featured-plugin__visual-cell.head {
  background: var(--sand);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.featured-plugin__visual-cell.label {
  background: #faf8f2;
  font-weight: 600;
}

.featured-plugin__visual-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  background: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.featured-plugin__visual-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
}

.section__header,
.section-head {
  text-align: center;
  margin-bottom: 48px;
}

.section__header h2,
.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.section__header p,
.section-head p {
  color: var(--muted);
  font-size: 16px;
  max-width: 560px;
  margin: 14px auto 0;
}

.section__link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--orange);
  opacity: 0.9;
}

.section__link:hover {
  opacity: 1;
}

.text-center {
  text-align: center;
}

/* Eyebrow */
.eyebrow,
.hero__badge {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  font-family: var(--font-mono);
  margin-bottom: 18px;
  display: block;
}

/* Hero */
.hero {
  padding: 40px 0 80px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5.5vw, 58px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.02em;
  max-width: 820px;
  margin: 0 auto 18px;
}

.hero h1 em,
.hero h1 span {
  font-style: italic;
  color: var(--orange);
}

.hero p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero__actions,
.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-family: var(--font-mono);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.15s ease;
}

.btn--primary,
.btn-primary {
  background: var(--ink);
  color: var(--cream);
}

.btn--primary:hover,
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -8px rgba(20, 20, 26, 0.4);
  color: var(--cream);
}

.btn--secondary,
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn--secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  color: var(--ink);
}

.btn--lime,
.btn-lime {
  background: var(--lime);
  color: var(--ink);
}

.btn--lime:hover,
.btn-lime:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -8px rgba(199, 242, 107, 0.5);
  color: var(--ink);
}

.btn--download {
  background: var(--indigo);
  color: var(--cream);
  font-size: 14px;
  padding: 13px 24px;
  width: 100%;
  justify-content: center;
}

.btn--download:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -8px rgba(45, 42, 74, 0.4);
  color: var(--cream);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

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

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

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -24px rgba(20, 20, 26, 0.2);
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.card__title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 400;
  margin: 0 0 8px;
  line-height: 1.3;
}

.card__title a {
  color: var(--ink);
}

.card__title a:hover {
  color: var(--orange);
}

.card__excerpt {
  margin: 0 0 1rem;
  flex: 1;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 8px;
}

.card__link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--orange);
}

.card__link:hover {
  opacity: 0.8;
}

.card__version {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--purple);
  background: rgba(123, 94, 167, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--sand);
  color: var(--muted);
}

/* Page header */
.page-header {
  text-align: center;
  padding: 40px 0 48px;
  margin-bottom: 0;
  border-bottom: none;
}

.page-header .eyebrow {
  margin-bottom: 14px;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.page-header p {
  margin: 0 auto;
  max-width: 560px;
  color: var(--muted);
  font-size: 16px;
}

/* Detail pages */
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.prose {
  max-width: 720px;
  line-height: 1.75;
  font-size: 15px;
}

.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 2rem 0 0.75rem;
}

.prose h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  margin: 1.5rem 0 0.5rem;
}

.prose p {
  margin: 0 0 1rem;
  color: var(--ink);
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.35rem;
  color: var(--muted);
}

.prose a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--sand);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--ink);
}

.prose pre {
  background: var(--indigo-deep);
  color: #f2f1f8;
  border-radius: 14px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 0 0 1rem;
}

.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.code-block {
  margin: 0 0 1.5rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 32px -20px rgba(20, 20, 26, 0.35);
}

.code-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 1rem;
  background: var(--indigo);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-block__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(242, 241, 248, 0.72);
}

.code-block__copy {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: #f2f1f8;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.code-block__copy:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.code-block__copy.is-copied {
  background: rgba(199, 242, 107, 0.18);
  border-color: rgba(199, 242, 107, 0.45);
  color: var(--lime);
}

.code-block pre {
  margin: 0;
  border-radius: 0;
}

/* YouTube */
.youtube-embed {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 2rem auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px -24px rgba(20, 20, 26, 0.2);
}

.youtube-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.footer-cta,
.youtube-cta {
  background: var(--indigo-deep);
  color: #f2f1f8;
  border-radius: 28px;
  padding: 64px 40px;
  text-align: center;
}

.footer-cta h2,
.youtube-cta h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 400;
  margin: 0 0 14px;
}

.footer-cta p,
.youtube-cta p {
  opacity: 0.75;
  max-width: 460px;
  margin: 0 auto 30px;
  font-size: 15.5px;
}

.footer-cta .btn-ghost,
.youtube-cta .btn--secondary {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.footer-cta .btn-ghost:hover,
.youtube-cta .btn--secondary:hover {
  border-color: #fff;
  color: #fff;
}

/* Plugin detail */
.plugin-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .plugin-layout {
    grid-template-columns: 1fr 300px;
    align-items: start;
  }
}

.plugin-sidebar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky;
  top: calc(var(--header-height) + 1rem);
}

.plugin-sidebar .btn--download {
  margin-bottom: 1.5rem;
}

.plugin-sidebar h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange);
  margin: 0 0 1rem;
}

.plugin-info-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.plugin-info-list li {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

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

.plugin-info-list .label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.plugin-info-list .value {
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 12px;
}

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

.feature-list li {
  padding: 8px 0 8px 1.5rem;
  position: relative;
  font-size: 14.5px;
  color: var(--muted);
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--sage);
  font-weight: 700;
}

.plugin-screenshot {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 1.5rem 0;
  box-shadow: 0 20px 40px -24px rgba(20, 20, 26, 0.12);
}

.changelog {
  margin-top: 2.5rem;
}

.changelog h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  margin: 0 0 1rem;
}

.changelog-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.changelog-item:last-child {
  border-bottom: none;
}

.changelog-item h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--orange);
  margin: 0 0 0.35rem;
  letter-spacing: 0.04em;
}

.changelog-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.related-links {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.related-links h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange);
  margin: 0 0 0.75rem;
}

.related-links a {
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 36px 0;
  background: var(--cream);
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
}

.site-footer__logo img {
  height: 44px;
  width: auto;
  max-width: 220px;
  opacity: 0.9;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  font-size: 13px;
}

.footer-links a:hover {
  color: var(--ink);
}

.site-footer p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* States */
.empty-state,
.error-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
}

.error-state h1 {
  color: var(--danger);
  font-family: var(--font-serif);
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--orange);
}

.detail-content {
  max-width: 900px;
  margin: 0 auto;
}

/* Mobile */
@media (max-width: 720px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 16px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 0;
    opacity: 1;
  }

  .site-nav .nav-cta {
    text-align: center;
    margin-top: 8px;
  }

  .nav-toggle {
    display: block;
  }

  .site-header {
    position: relative;
  }

  .section {
    padding: 56px 0;
  }

  .footer-cta,
  .youtube-cta {
    padding: 48px 24px;
    border-radius: 20px;
  }

  .site-footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 620px) {
  :root {
    --header-height: 76px;
  }

  .site-header__inner {
    padding: 10px 16px;
  }

  .site-logo img {
    height: 52px;
    max-width: min(260px, 58vw);
  }
}
