/* Shared marketing pages theme — landing / pricing / features / packages */

:root {
  --mr-bg: #fffdfb;
  --mr-surface: #ffffff;
  --mr-muted: #fafaf9;
  --mr-border: #e7e5e4;
  --mr-text: #1c1917;
  --mr-text-muted: #57534e;
  --mr-text-subtle: #78716c;
  --mr-accent: #238a92;
  --mr-chip-bg: #f5f5f4;
  --mr-step-index-bg: #f5f5f4;
  --mr-step-index-accent-bg: #1c1917;
  --mr-step-index-accent-text: #ffffff;
  --mr-btn-primary-bg: #18181b;
  --mr-btn-primary-border: #18181b;
  --mr-btn-primary-text: #ffffff;
  --mr-btn-primary-hover-bg: #000000;
  --mr-btn-primary-hover-border: #000000;
  --mr-btn-secondary-bg: #eceae8;
  --mr-btn-secondary-border: #eceae8;
  --mr-btn-secondary-text: #18181b;
  --mr-btn-secondary-hover-bg: #dfdddb;
  --mr-btn-secondary-hover-border: #c4c4c8;
  --mr-btn-secondary-hover-text: #09090b;
  --mr-radius-card: 8px;
  --mr-radius-control: 6px;
  --mr-radius-button: 8px;
}

body.marketing-page {
  background: var(--mr-bg);
  color: var(--mr-text);
}

.marketing-page-shell {
  background: var(--mr-bg);
}

.menu-blur {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

nav svg,
header svg,
#header-placeholder svg {
  max-height: 32px !important;
  width: auto !important;
}

.grid-background {
  background-image: radial-gradient(circle at 1px 1px, rgba(120, 113, 108, 0.07) 1px, transparent 0);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
}

.custom-scroll::-webkit-scrollbar {
  height: 8px;
}

.custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(120, 113, 108, 0.2);
  border-radius: 9999px;
}

.custom-scroll::-webkit-scrollbar-track {
  background: transparent;
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  animation: mr-fade-up 0.7s ease forwards;
  animation-delay: 0.05s;
}

.fade-up-delayed {
  opacity: 0;
  transform: translateY(18px);
  animation: mr-fade-up 0.7s ease forwards;
  animation-delay: 0.15s;
}

@keyframes mr-fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-section {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--fade-delay, 0s);
}

.fade-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-fade {
  opacity: 0;
  transform: translateY(18px);
  animation: mr-hero-fade 0.75s ease forwards;
  animation-delay: 0.08s;
}

@keyframes mr-hero-fade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typography & badges */
.mr-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  margin-top: 0.75rem;
  border-radius: var(--mr-radius-control);
  background: var(--mr-chip-bg);
  border: 1px solid var(--mr-border);
  color: var(--mr-text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.mr-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--mr-radius-control);
  background: var(--mr-chip-bg);
  border: 1px solid var(--mr-border);
  color: var(--mr-text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.mr-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mr-text-subtle);
}

/* Panels & cards */
.mr-section-panel {
  border-radius: var(--mr-radius-card);
  border: 1px solid var(--mr-border);
  background: var(--mr-muted);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

.mr-card {
  border-radius: var(--mr-radius-card);
  border: 1px solid var(--mr-border);
  background: var(--mr-surface);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

.mr-card-muted {
  border-radius: var(--mr-radius-card);
  border: 1px solid var(--mr-border);
  background: var(--mr-muted);
}

.mr-step-card {
  width: 100%;
  border-radius: var(--mr-radius-card);
  border: 1px solid var(--mr-border);
  background: var(--mr-surface);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

.mr-step-card.is-muted {
  background: var(--mr-muted);
}

.mr-step-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--mr-radius-control);
  background: var(--mr-step-index-bg);
  border: 1px solid var(--mr-border);
  color: var(--mr-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.mr-step-index.is-accent {
  background: var(--mr-step-index-accent-bg);
  border-color: var(--mr-step-index-accent-bg);
  color: var(--mr-step-index-accent-text);
}

.mr-feature-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--mr-radius-control);
  background: var(--mr-chip-bg);
  border: 1px solid var(--mr-border);
  color: var(--mr-text);
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
}

.mr-connector-line {
  width: 1px;
  height: 1.5rem;
  background: var(--mr-border);
}

.mr-connector-arrow {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--mr-border);
}

/* Buttons */
.mr-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--mr-radius-button);
  background: var(--mr-btn-primary-bg);
  color: var(--mr-btn-primary-text);
  border: 1px solid var(--mr-btn-primary-border);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.mr-btn-primary:hover {
  background: var(--mr-btn-primary-hover-bg);
}

.mr-btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.12);
}

.mr-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--mr-radius-button);
  background: var(--mr-btn-secondary-bg);
  color: var(--mr-btn-secondary-text);
  border: 1px solid var(--mr-btn-secondary-border);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.mr-btn-secondary:hover {
  background: var(--mr-btn-secondary-hover-bg);
}

.mr-btn-secondary svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.tool-content-link {
  color: #57534e;
  text-decoration-color: #a8a29e;
  text-underline-offset: 0.15em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.tool-content-link:hover {
  color: #1c1917;
  text-decoration-color: currentColor;
}

.mr-code-panel {
  border-radius: var(--mr-radius-card);
  border: 1px solid var(--mr-border);
  background: var(--mr-muted);
}

/* Apple-style tools local subnav — sticks after main header scrolls away */
.tools-subnav-sentinel {
  height: 1px;
  margin: 0;
  padding: 0;
  pointer-events: none;
  visibility: hidden;
}

.tools-subnav {
  position: sticky;
  top: 0;
  z-index: 45;
  width: 100%;
  border-bottom: 1px solid rgba(28, 25, 23, 0.1);
  background: rgba(255, 253, 251, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.tools-subnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  /* Match main header: max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 */
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  height: 3.25rem;
}

@media (min-width: 640px) {
  .tools-subnav-inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .tools-subnav-inner {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.tools-subnav-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--mr-text);
}

.tools-subnav-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;
  height: 1.125rem;
  margin-right: 0;
  opacity: 0;
  overflow: hidden;
  flex-shrink: 0;
  transform: translateX(-4px);
  pointer-events: none;
  transition:
    width 0.22s ease,
    margin-right 0.22s ease,
    opacity 0.22s ease,
    transform 0.22s ease;
}

.tools-subnav-mark svg {
  display: block;
  width: auto;
  height: 1.125rem;
}

.tools-subnav-mark-fill {
  fill: #121212;
}

.tools-subnav-mark-wave {
  fill: #ffffff;
}

.tools-subnav-divider {
  display: inline-block;
  max-width: 0;
  margin-right: 0;
  opacity: 0;
  overflow: hidden;
  color: var(--mr-text-muted, #a8a29e);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1;
  transform: translateX(-2px);
  transition:
    max-width 0.22s ease,
    margin-right 0.22s ease,
    opacity 0.22s ease,
    transform 0.22s ease;
}

.tools-subnav.is-stuck .tools-subnav-mark {
  width: 1.55rem;
  margin-right: 0.45rem;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.tools-subnav.is-stuck .tools-subnav-divider {
  max-width: 0.75rem;
  margin-right: 0.4rem;
  opacity: 1;
  transform: translateX(0);
}

.tools-subnav-title {
  flex-shrink: 0;
  color: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: default;
  pointer-events: none;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  .tools-subnav-mark,
  .tools-subnav-divider {
    transition: none;
  }
}

.tools-subnav-links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tools-subnav-links::-webkit-scrollbar {
  display: none;
}

.tools-subnav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  color: var(--mr-text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.tools-subnav-link:hover {
  color: var(--mr-text);
  background: rgba(28, 25, 23, 0.05);
}

.tools-subnav-link.is-active {
  color: var(--mr-text);
  font-weight: 600;
  background: rgba(28, 25, 23, 0.07);
}

@media (max-width: 640px) {
  .tools-subnav-inner {
    height: 3rem;
  }

  .tools-subnav-title {
    font-size: 0.9375rem;
  }

  .tools-subnav-link {
    padding: 0.3125rem 0.625rem;
    font-size: 0.75rem;
  }
}

.mr-code-panel pre {
  color: var(--mr-text);
}

/* Accent overrides for legacy utility classes on marketing pages */
.marketing-page .text-primary-600,
.marketing-page .text-primary-700 {
  color: var(--mr-accent) !important;
}

.marketing-page [class*="hover:border-primary"] {
  transition: border-color 0.2s ease;
}

.marketing-page [class*="hover:border-primary"]:hover {
  border-color: #d6d3d1 !important;
}
