/* =========================================================
   TRIBASE — Standalone WordPress theme stylesheet
   Hand-written. No Tailwind. No build step.
   ========================================================= */

/* ---------- Design Tokens (Platform81-inspired dark + coral) ---------- */
:root {
  --background: oklch(0.14 0.005 280);
  --foreground: oklch(0.98 0.003 85);
  --surface: oklch(0.17 0.006 280);
  --surface-elevated: oklch(0.20 0.008 280);
  --hairline: oklch(0.98 0.003 85 / 0.10);
  --muted-fg: oklch(0.70 0.01 280);

  --primary: oklch(0.68 0.23 25);
  --primary-foreground: oklch(0.99 0.003 85);
  --primary-glow: oklch(0.78 0.20 40);

  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-pill: 9999px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: "Archivo", "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 80rem;
  --gradient-brand: linear-gradient(135deg, oklch(0.68 0.23 25), oklch(0.78 0.20 45));
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--primary); color: var(--primary-foreground); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  font-weight: 300;
  margin: 0;
  line-height: 1.05;
}

/* ---------- Utilities ---------- */
.container-x { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.muted { color: var(--muted-fg); }
.small { font-size: 0.875rem; }
.xs { font-size: 0.75rem; }
.caps { text-transform: uppercase; letter-spacing: 0.2em; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 9999px; background: var(--primary); margin-right: 6px; vertical-align: middle; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.25rem 0.625rem; border-radius: 9999px;
  background: oklch(0.68 0.23 25 / 0.10);
  border: 1px solid oklch(0.68 0.23 25 / 0.20);
  font-size: 10px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--primary);
}
.text-primary { color: var(--primary); }
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }
.brand-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.glow { box-shadow: 0 0 80px -16px oklch(0.68 0.23 25 / 0.40); }
.lines-corner {
  background-image: repeating-linear-gradient(
    -60deg, transparent 0 22px, oklch(0.68 0.23 25 / 0.35) 22px 23px
  );
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; height: 2.75rem; padding: 0 1.25rem;
  border-radius: var(--radius-pill); font-weight: 500; font-size: 0.9375rem;
  transition: opacity .2s ease, background-color .2s ease, transform .2s ease;
  border: 1px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { opacity: 0.92; }
.btn-ghost { border-color: var(--hairline); background: transparent; }
.btn-ghost:hover { background: var(--surface); }
.btn-lg { height: 3rem; padding: 0 1.5rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in oklab, var(--background) 70%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.header-inner { height: 4rem; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 0.625rem; }
.brand-mark { width: 28px; height: 28px; }
.brand-name { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 300; line-height: 1; }
.brand-accent { color: var(--primary); font-weight: 500; }
.primary-nav { display: none; }
.nav-list { display: flex; gap: 2rem; align-items: center; font-size: 0.875rem; color: var(--muted-fg); }
.nav-list a { transition: color .2s; }
.nav-list a:hover, .nav-list .current-menu-item a { color: var(--foreground); }
.header-cta { display: flex; align-items: center; gap: 0.75rem; }
.phone { display: none; font-size: 0.75rem; color: var(--muted-fg); }
.phone:hover { color: var(--foreground); }
.menu-toggle {
  width: 36px; height: 36px; border: 1px solid var(--hairline); border-radius: 6px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.menu-toggle span { display: block; width: 16px; height: 1px; background: var(--foreground); }
.mobile-nav { border-top: 1px solid var(--hairline); background: var(--background); }
.mobile-list { display: flex; flex-direction: column; padding: 1rem 0; gap: 0.25rem; }
.mobile-list a { padding: 0.5rem 0; color: var(--muted-fg); font-size: 0.875rem; }
.mobile-nav .btn { margin-top: 0.75rem; margin-bottom: 1rem; }
.header-cta .btn { display: none; }

@media (min-width: 768px) {
  .primary-nav { display: block; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
  .header-cta .btn { display: inline-flex; }
}
@media (min-width: 1024px) {
  .phone { display: inline-flex; align-items: center; }
}

/* ---------- Main / Sections ---------- */
.site-main { padding-top: 4rem; min-height: calc(100vh - 4rem); }
.section { padding: 5rem 0; }
@media (min-width: 768px) { .section { padding: 7rem 0; } }
.section-bordered { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); background: color-mix(in oklab, var(--surface) 40%, transparent); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 6rem 0 5rem;
}
@media (min-width: 768px) { .hero { padding: 9rem 0 9rem; } }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 15% 10%, oklch(0.68 0.23 25 / 0.18), transparent 60%),
    radial-gradient(50% 50% at 90% 10%, oklch(0.78 0.20 45 / 0.10), transparent 60%);
}
.hero-lines {
  display: none; position: absolute; top: 0; right: 0; z-index: -1;
  height: 110%; width: 36%; opacity: 0.6;
  clip-path: polygon(35% 0, 100% 0, 100% 100%, 0 100%);
}
@media (min-width: 768px) { .hero-lines { display: block; } }
.hero-title {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 7.5rem);
  font-weight: 300;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.hero-title .accent { color: var(--primary); font-weight: 400; }
.hero-lead { margin-top: 2rem; font-size: 1.125rem; color: var(--muted-fg); max-width: 40rem; }
@media (min-width: 768px) { .hero-lead { font-size: 1.25rem; } }
.hero-ctas { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 640px) { .hero-ctas { flex-direction: row; } }
.hero-trust { margin-top: 3rem; display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; font-size: 0.75rem; color: var(--muted-fg); }
.hero-trust span { display: inline-flex; align-items: center; }

/* ---------- Heading scale ---------- */
.h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 700; letter-spacing: -0.02em; text-transform: none; font-family: var(--font-display); }
.h2 { font-size: clamp(1.875rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.02em; text-transform: none; }
.h3 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; text-transform: none; }
.lead { font-size: 1.0625rem; color: var(--muted-fg); }

/* ---------- Logo strip ---------- */
.logo-strip { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); background: color-mix(in oklab, var(--surface) 40%, transparent); }
.logo-strip-inner { display: flex; align-items: center; gap: 2rem; padding: 2rem 0; overflow-x: auto; }
.logo-strip-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted-fg); flex-shrink: 0; }
.logo-strip-items { display: flex; gap: 2rem; font-size: 0.875rem; color: var(--muted-fg); font-weight: 500; }
.logo-strip-items span { white-space: nowrap; }

/* ---------- Card grid (services) ---------- */
.grid-cards {
  display: grid; gap: 1px; background: var(--hairline);
  border: 1px solid var(--hairline); border-radius: var(--radius-xl);
  overflow: hidden;
}
.grid-cards.cols-2 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-cards.cols-2 { grid-template-columns: 1fr 1fr; } }
.grid-cards.cols-3 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-cards.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-cards.cols-4 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-cards.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-cards.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--background); padding: 2rem; display: flex; flex-direction: column;
  justify-content: space-between; min-height: 220px;
  transition: background-color .2s ease;
}
@media (min-width: 768px) { .card { padding: 2.5rem; } }
a.card:hover { background: var(--surface); }
.card-num { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted-fg); }
.card-num.accent { color: var(--primary); }
.card h3 { margin-top: 1rem; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; text-transform: none; font-family: var(--font-display); }
.card p { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted-fg); line-height: 1.6; max-width: 28rem; }
.card-link { margin-top: 2rem; display: inline-flex; gap: 0.5rem; align-items: center; font-size: 0.875rem; color: var(--primary); }

/* ---------- Section heading block ---------- */
.section-heading { max-width: 36rem; margin-bottom: 3rem; }
.section-heading h2 { margin-top: 1rem; }
.section-heading p { margin-top: 1rem; color: var(--muted-fg); max-width: 32rem; }
.section-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 3rem; flex-wrap: wrap; }

/* ---------- Two-column grid ---------- */
.two-col { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .two-col { grid-template-columns: 1fr 1fr; align-items: center; } }
.two-col.thirds { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .two-col.thirds { grid-template-columns: 1fr 2fr; } }

/* ---------- Results / metric panel ---------- */
.metric-panel { border-radius: var(--radius-xl); border: 1px solid var(--hairline); background: var(--background); padding: 1.5rem; }
@media (min-width: 768px) { .metric-panel { padding: 2rem; } }
.metric-header { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted-fg); }
.metric-header .live { color: var(--primary); }
.metric-grid { margin-top: 1.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.metric-cell { padding: 1rem; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--hairline); }
.metric-cell .k { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--muted-fg); }
.metric-cell .v { margin-top: 0.5rem; font-size: 1.5rem; font-weight: 600; color: var(--primary); }
.bar-chart { margin-top: 1.5rem; height: 6rem; display: flex; align-items: flex-end; gap: 6px; }
.bar { flex: 1; border-radius: 2px; background: oklch(0.68 0.23 25 / 0.2); }
.bar.high { background: oklch(0.65 0.22 25 / 0.5); }

/* ---------- Pricing cards ---------- */
.pricing-grid { display: grid; gap: 1.5rem; max-width: 64rem; margin: 0 auto; }
@media (min-width: 768px) { .pricing-grid { grid-template-columns: 1fr 1fr; } }
.plan { position: relative; padding: 2rem; border-radius: var(--radius-xl); border: 1px solid var(--hairline); background: var(--background); }
@media (min-width: 768px) { .plan { padding: 2.5rem; } }
.plan.highlighted { border-color: oklch(0.68 0.23 25 / 0.5); background: var(--surface); box-shadow: 0 0 80px -16px oklch(0.68 0.23 25 / 0.40); }
.plan-badge { position: absolute; top: -0.75rem; left: 1.5rem; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; background: var(--primary); color: var(--primary-foreground); padding: 0.25rem 0.625rem; border-radius: 4px; }
.plan h3 { font-size: 1.25rem; font-weight: 600; text-transform: none; font-family: var(--font-display); }
.plan .price { margin-top: 1.5rem; font-size: 3rem; font-weight: 700; letter-spacing: -0.02em; font-family: var(--font-display); }
.plan .price small { font-size: 1rem; font-weight: 400; color: var(--muted-fg); }
.plan ul { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.875rem; }
.plan ul li { display: flex; gap: 0.75rem; align-items: flex-start; }
.plan ul li.off { color: oklch(0.70 0.01 280 / 0.6); }
.check, .nocheck {
  width: 16px; height: 16px; border-radius: 9999px; display: inline-grid; place-items: center;
  font-size: 10px; flex-shrink: 0; margin-top: 2px;
}
.check { background: var(--primary); color: var(--primary-foreground); }
.nocheck { border: 1px solid var(--hairline); color: var(--muted-fg); }
.plan .btn { width: 100%; margin-top: 2rem; }

/* ---------- FAQ / details ---------- */
.faq-list { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.faq-list details { padding: 1.25rem 0; border-bottom: 1px solid var(--hairline); }
.faq-list details:last-child { border-bottom: 0; }
.faq-list summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-weight: 500; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .plus {
  width: 24px; height: 24px; border-radius: 9999px; border: 1px solid var(--hairline);
  display: inline-grid; place-items: center; color: var(--muted-fg); transition: all .2s;
}
.faq-list details[open] summary .plus { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.faq-list details p { margin: 0.75rem 0 0; font-size: 0.875rem; color: var(--muted-fg); padding-right: 2rem; }

/* ---------- Forms ---------- */
.form { padding: 1.5rem; border-radius: var(--radius-xl); border: 1px solid var(--hairline); background: var(--surface); display: flex; flex-direction: column; gap: 1.25rem; }
@media (min-width: 768px) { .form { padding: 2rem; } }
.field-row { display: grid; gap: 1.25rem; }
@media (min-width: 768px) { .field-row.cols-2 { grid-template-columns: 1fr 1fr; } }
.field label { display: block; }
.field .lbl { display: block; font-size: 0.75rem; font-weight: 500; color: var(--muted-fg); margin-bottom: 0.5rem; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--background); border: 1px solid var(--hairline);
  border-radius: var(--radius-md); padding: 0 0.75rem; height: 2.75rem;
  font: inherit; color: inherit; transition: border-color .2s, box-shadow .2s;
}
.field textarea { padding: 0.75rem; height: auto; min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: oklch(0.68 0.23 25 / 0.4);
  box-shadow: 0 0 0 3px oklch(0.68 0.23 25 / 0.15);
}
.form-success { padding: 2.5rem; border-radius: var(--radius-xl); border: 1px solid oklch(0.68 0.23 25 / 0.3); background: var(--surface); text-align: center; }

/* ---------- Contact aside ---------- */
.contact-aside { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-aside .card-info { padding: 1.5rem; border-radius: var(--radius-xl); border: 1px solid var(--hairline); background: var(--background); }
.contact-aside .card-info .k { font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--muted-fg); }
.contact-aside .card-info .v { margin-top: 0.5rem; font-weight: 600; }
.contact-aside .card-info a.v { color: var(--primary); }

/* ---------- About metrics ---------- */
.about-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-self: start; }
.about-metrics .m { padding: 1.5rem; border-radius: var(--radius-xl); border: 1px solid var(--hairline); background: var(--surface); }
.about-metrics .m .k { font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--muted-fg); }
.about-metrics .m .v { margin-top: 0.5rem; font-weight: 600; }

/* ---------- Bullet list ---------- */
.bullets { display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.875rem; }
.bullets li { display: flex; align-items: flex-start; gap: 0.75rem; }
.bullets li::before { content: ""; width: 6px; height: 6px; border-radius: 9999px; background: var(--primary); margin-top: 8px; flex-shrink: 0; }

.bullets-cards li { padding: 1rem 1.25rem; border-radius: var(--radius-md); border: 1px solid var(--hairline); background: var(--surface); }

/* ---------- CTA panel ---------- */
.cta-panel {
  position: relative; overflow: hidden;
  border-radius: var(--radius-xl); border: 1px solid var(--hairline);
  background: var(--surface);
  padding: 2.5rem; text-align: center;
}
@media (min-width: 768px) { .cta-panel { padding: 4rem; } }
.cta-panel h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 700; text-transform: none; font-family: var(--font-display); letter-spacing: -0.02em; }
.cta-panel p { margin-top: 0.75rem; color: var(--muted-fg); max-width: 36rem; margin-left: auto; margin-right: auto; }
.cta-panel .btn { margin-top: 2rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); margin-top: 6rem; padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand .brand { margin-bottom: 1rem; }
.footer-brand p { max-width: 22rem; }
.footer-brand .link-primary { margin-top: 1rem; display: inline-flex; align-items: center; color: var(--primary); }
.footer-heading { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; margin: 0 0 1rem; }
.footer-list { display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.875rem; color: var(--muted-fg); }
.footer-list a:hover { color: var(--foreground); }
.footer-bottom { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 0.75rem; justify-content: space-between; align-items: flex-start; }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; align-items: center; } }

/* ---------- Sticky CTA ---------- */
.sticky-cta {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 40;
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--primary); color: var(--primary-foreground);
  padding: 0.875rem 1.25rem; border-radius: var(--radius-pill);
  font-weight: 500; font-size: 0.875rem;
  box-shadow: 0 20px 50px -12px oklch(0 0 0 / 0.6);
}
.sticky-cta:hover { opacity: 0.92; }

/* ---------- Fade-up animation ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.6s cubic-bezier(0.16,1,0.3,1) both; }
.delay-1 { animation-delay: 80ms; }
.delay-2 { animation-delay: 160ms; }
.delay-3 { animation-delay: 240ms; }
.delay-4 { animation-delay: 320ms; }

/* ---------- Service approach grid ---------- */
.approach-card { background: var(--background); padding: 2rem; }
.approach-card .n { font-family: var(--font-mono); font-size: 0.75rem; color: var(--primary); }
.approach-card h3 { margin-top: 1rem; font-size: 1.125rem; font-weight: 600; text-transform: none; font-family: var(--font-display); }
.approach-card p { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted-fg); line-height: 1.6; }

/* ---------- Prose for free-text WP pages ---------- */
.prose { color: var(--foreground); line-height: 1.7; }
.prose h2, .prose h3 { margin-top: 2rem; }
.prose p { margin: 1rem 0; }
.prose a { color: var(--primary); text-decoration: underline; }

/* ---------- Small responsive helpers ---------- */
.hide-mobile { display: none; }
@media (min-width: 768px) { .hide-mobile { display: inline-flex; } }
.center { text-align: center; max-width: 36rem; margin: 0 auto 3rem; }
