/* Shared styles for sub-pages (platform, solutions, pricing, blog, docs, contact) */

/* Tag pill (used across all pages) */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-2);
}
.tag-accent {
  border-color: color-mix(in oklch, var(--accent) 40%, transparent);
  background: color-mix(in oklch, var(--accent) 10%, transparent);
  color: var(--accent-hi);
}
button.tag { cursor: pointer; transition: border-color var(--t-fast), color var(--t-fast); }
button.tag:hover { color: var(--text); border-color: var(--line-strong, var(--text-3)); }

.sub-hero {
  position: relative;
  padding: var(--s-16) 0 var(--s-12);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
@media (max-width: 720px) {
  .sub-hero { padding: var(--s-12) 0 var(--s-8); }
  .sub-hero h1 { font-size: clamp(28px, 9vw, 40px); }
  .sub-hero p.lede { font-size: 15px; margin-top: 16px; }
}
.sub-hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 60% at 18% 10%,
      color-mix(in oklch, var(--glow-1) 60%, transparent) 0%,
      color-mix(in oklch, var(--glow-1) 16%, transparent) 42%,
      transparent 72%),
    radial-gradient(ellipse 55% 65% at 82% 30%,
      color-mix(in oklch, var(--glow-2) 50%, transparent) 0%,
      color-mix(in oklch, var(--glow-2) 14%, transparent) 44%,
      transparent 74%),
    radial-gradient(ellipse 70% 65% at 50% 100%,
      color-mix(in oklch, var(--glow-3) 55%, transparent) 0%,
      color-mix(in oklch, var(--glow-3) 12%, transparent) 40%,
      transparent 72%);
  filter: blur(60px) saturate(1.05);
  opacity: var(--glow-strength);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 80%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 80%, transparent 100%);
}
:root[data-theme="light"] .sub-hero-bg { mix-blend-mode: multiply; filter: blur(70px) saturate(0.9); }
/* Sub-hero grid overlay removed — glow-only background per design preference. */
.sub-hero .container { position: relative; }
.sub-hero h1 {
  max-width: 780px;
  font-size: clamp(36px, 4.6vw, 64px);
  margin-top: 14px;
}
.sub-hero p.lede {
  margin-top: 22px;
  max-width: 620px;
  color: var(--text-2);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.55;
}

/* Generic card grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; }
}

/* Pricing -------------------------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}
.plan {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
}
.plan--featured {
  background:
    radial-gradient(ellipse 100% 100% at 100% 0%, color-mix(in oklch, var(--accent) 18%, transparent), transparent 60%),
    var(--surface);
  border-color: color-mix(in oklch, var(--accent) 50%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in oklch, var(--accent) 30%, transparent),
              var(--shadow-2);
}
.plan-name { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-hi); }
.plan-price {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 56px; font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}
.plan-price small { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); margin-left: 4px; font-weight: 400; }
.plan-tag { color: var(--text-2); margin-top: 14px; font-size: 14px; }
.plan ul {
  list-style: none; padding: 0; margin: 28px 0;
  display: flex; flex-direction: column; gap: 10px;
}
.plan ul li {
  font-size: 14px; color: var(--text-2);
  display: grid; grid-template-columns: 18px 1fr; gap: 8px;
  align-items: start;
}
.plan ul li::before {
  content: "✓"; color: var(--accent-hi);
  font-size: 14px;
}
.plan .btn { margin-top: auto; }
@media (max-width: 980px) { .pricing-grid { grid-template-columns: 1fr; } }

/* Pricing comparison */
.compare {
  margin-top: var(--s-12);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.compare { overflow-x: auto; }
.compare table { width: 100%; border-collapse: collapse; min-width: 560px; }
.compare th, .compare td {
  padding: 14px 18px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.compare thead th {
  background: var(--surface-2);
  font-weight: 500;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-3);
}
.compare tbody th { color: var(--text); font-weight: 500; }
.compare td { color: var(--text-2); font-family: var(--font-mono); font-size: 13px; }
.compare td.ok { color: var(--accent-hi); }
.compare td.no { color: var(--text-dim); }
.compare tr:last-child td, .compare tr:last-child th { border-bottom: 0; }

/* Solutions cards */
.sol-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden;
}
.sol-card::after {
  content: "";
  position: absolute; right: -40px; top: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklch, var(--accent) 18%, transparent), transparent 60%);
  pointer-events: none;
}
.sol-card h3 { font-size: 20px; }
.sol-card p { color: var(--text-2); font-size: 14px; line-height: 1.55; }
.sol-card .tag { align-self: flex-start; }
.sol-card .lnk { margin-top: auto; font-size: 14px; }

/* Blog list */
.blog-feature {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  margin-bottom: var(--s-12);
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  align-items: center;
}
.blog-feature .resource-img { height: 280px; }
.blog-feature h2 { font-size: clamp(22px, 2.4vw, 32px); }
.blog-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 980px) {
  .blog-feature { grid-template-columns: 1fr; }
  .blog-list { grid-template-columns: 1fr; }
}

.post-row {
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}
.post-row .meta { display: flex; gap: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.post-row h3 { font-size: 19px; line-height: 1.3; transition: color var(--t-fast); cursor: pointer; }
.post-row:hover h3 { color: var(--accent-hi); }

/* Docs ----------------------------------------------------- */
.docs-shell {
  display: grid; grid-template-columns: 240px 1fr 200px;
  gap: 56px;
  padding: var(--s-12) 0;
}
.docs-side {
  position: sticky; top: 100px;
  align-self: start;
  font-size: 14px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.docs-side h4 {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-3); font-weight: 500;
  margin: 24px 0 8px;
}
.docs-side h4:first-child { margin-top: 0; }
.docs-side a {
  display: block;
  padding: 6px 10px;
  color: var(--text-2);
  border-radius: var(--r-sm);
  font-size: 14px;
}
.docs-side a:hover { color: var(--text); background: var(--surface); }
.docs-side a.is-on {
  color: var(--accent-hi);
  background: color-mix(in oklch, var(--accent) 10%, transparent);
}

.docs-content { max-width: 720px; }
.docs-content h1 { font-size: 40px; }
.docs-content h2 { font-size: 28px; margin-top: 48px; }
.docs-content h3 { font-size: 19px; margin-top: 32px; }
.docs-content p { margin-top: 14px; color: var(--text-2); line-height: 1.7; font-size: 15px; }
.docs-content code {
  font-family: var(--font-mono); font-size: 13px;
  background: var(--surface-2);
  padding: 2px 6px; border-radius: 4px;
  color: var(--accent-hi);
}
.docs-content pre {
  margin: 18px 0;
  background: oklch(0.10 0.02 270);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  overflow-x: auto;
  font-family: var(--font-mono); font-size: 13px;
  line-height: 1.7;
  color: oklch(0.86 0.02 270);
}
.docs-content pre code { background: none; padding: 0; color: inherit; }
.docs-content ul {
  margin-top: 14px;
  padding-left: 22px;
  color: var(--text-2);
}
.docs-content ul li { margin: 6px 0; }
.docs-content blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: color-mix(in oklch, var(--accent) 6%, transparent);
  color: var(--text-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.docs-toc {
  position: sticky; top: 100px;
  align-self: start;
  font-size: 13px;
}
.docs-toc h4 {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-3); margin-bottom: 12px; font-weight: 500;
}
.docs-toc a {
  display: block; padding: 4px 0;
  color: var(--text-3);
  border-left: 2px solid var(--line-soft);
  padding-left: 10px;
}
.docs-toc a:hover, .docs-toc a.is-on { color: var(--text); border-color: var(--accent); }

@media (max-width: 1080px) {
  .docs-shell { grid-template-columns: 220px 1fr; gap: 32px; }
  .docs-toc { display: none; }
}
@media (max-width: 760px) {
  .docs-shell { grid-template-columns: 1fr; }
  .docs-side { position: static; max-height: none; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  display: flex; flex-direction: column; gap: 16px;
}
.contact-form label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-3);
  display: block; margin-bottom: 6px;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 25%, transparent);
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.contact-aside { display: flex; flex-direction: column; gap: 24px; }
.contact-block {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.contact-block h4 { font-size: 15px; margin-bottom: 8px; }
.contact-block p, .contact-block a { font-size: 14px; color: var(--text-2); }
.contact-block .lnk { color: var(--accent-hi); display: inline-flex; gap: 6px; margin-top: 10px; }

@media (max-width: 980px) {
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-row { grid-template-columns: 1fr; }
}

/* Platform-specific architecture diagram */
.arch {
  margin-top: var(--s-12);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 40px;
}
.arch-row {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}
/* One equal-width column per cell, regardless of how many stages/disciplines —
   the row never wraps (was hardcoded repeat(4/5), which broke when a 5th stage
   was added to r1). */
.arch-row.r1,
.arch-row.r2 { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.arch-row.r3 { grid-template-columns: 1fr; }
.arch-cell {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--bg-elev);
  text-align: center;
}
.arch-cell.core {
  background: color-mix(in oklch, var(--accent) 10%, var(--surface));
  border-color: color-mix(in oklch, var(--accent) 30%, transparent);
  color: var(--accent-hi);
}
.arch-cell strong { display: block; font-size: 14px; color: var(--text); }
.arch-cell span { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); margin-top: 4px; }
.arch-arrow { text-align: center; color: var(--text-3); font-family: var(--font-mono); font-size: 18px; margin: 4px 0; }
@media (max-width: 880px) {
  .arch-row.r1, .arch-row.r2 { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
  .arch { padding: 24px; }
}
@media (max-width: 480px) {
  .arch { padding: 18px; }
  .arch-row.r1, .arch-row.r2 { grid-auto-flow: row; grid-template-columns: 1fr; }
  .plan { padding: 24px; }
  .blog-feature { padding: 20px; }
  .contact-form { padding: 24px; }
}
